Script to watch Jpeg size, notify of trouble

Forum for questions and support relating to the 1.24.x releases only.
Locked
ketsu
Posts: 12
Joined: Mon Jan 12, 2009 5:43 am

Script to watch Jpeg size, notify of trouble

Post by ketsu »

I really like my Zoneminder setup. But I most likely will never need to go and look at the video I have recorded. I am a little worried that something may go wrong, the camera dies, the wire comes loose, or something crashes Zoneminder.

I was thinking about making a little bash script that would watch my events folder for new Jpegs. I know about what size the files normally are. I also know the files are much smaller if it is a jpeg of a blank sceen (no camera connection).

So I think I could use the find command and have it shoot out a mail if there are no new files, and also if the newest files are smaller than the expected size.

Has anyone implemented anything like this?

Does anyone have a better way of going about insuring video is being recorded correctly?
koffu
Posts: 7
Joined: Thu Apr 15, 2010 11:24 am

Post by koffu »

I'm interesting with this question too. I need monitoring service with notifications, when camera does not work.
Could somebody answer, how to get current camera status from command line?
joako
Posts: 30
Joined: Mon Nov 01, 2010 7:10 am

Post by joako »

Has anyone explored using Nagios to monitor zoneminder?
ketsu
Posts: 12
Joined: Mon Jan 12, 2009 5:43 am

Post by ketsu »

I am open to any solution that would work.

Would Nagios be able to check file size? I am concerned about losing my video feed to zoneminder. Does Nagios just watch the service to make sure it is running?

I want to know if my camera dies, or the cable accidentally gets pulled out. Losing the signal would make the screen go black (or blue) and the Jpeg size would go down. I am thinking a little shell magic with the find command would do the trick.

If anyone has a better solution, I would love to hear it.
Locked