Send emails if camera fails/goes offline?

Forum for questions and support relating to the 1.26.x releases only.
Locked
zmusr
Posts: 3
Joined: Sat Oct 26, 2013 4:50 pm

Send emails if camera fails/goes offline?

Post by zmusr »

I feel like I have to be missing something, but I cannot figure out or find in the documentation how to get an email if one (or more) of the cameras are not working. I just setup ZM yesterday and today I messed up the config and the camera went offline (shows red on main screen), and if I was not in the console I would not have known.

Thanks for any help!
mikb
Posts: 661
Joined: Mon Mar 25, 2013 12:34 pm

Re: Send emails if camera fails/goes offline?

Post by mikb »

I don't think there is such a feature, you're not the first to ask ...

http://www.zoneminder.com/forums/viewto ... 29&t=21552
lpallard
Posts: 87
Joined: Fri Mar 05, 2010 10:59 pm

Re: Send emails if camera fails/goes offline?

Post by lpallard »

If its not already there, I suggest you open an enhancement ticket on the github page... No matter how this feature is added to ZM in future releases, I believe to be a reliable surveillance service, this kind of feature is essential.
mythedoff
Posts: 25
Joined: Sat Dec 04, 2010 5:21 pm

Re: Send emails if camera fails/goes offline?

Post by mythedoff »

Perhaps not applicable but when I was having a problem with a ip cam, I used a cron job to run a script. The script would ping the ip and exit if successful but loop, for reliability, after wait and ping again. On failure a sms would be sent to my phone using sendEmail program.
Or maybe watch a directory not filling as expected.
mikb
Posts: 661
Joined: Mon Mar 25, 2013 12:34 pm

Re: Send emails if camera fails/goes offline?

Post by mikb »

mythedoff wrote:The script would ping the ip and exit if successful but loop, for reliability, after wait and ping again
It is perfectly possible for an IP camera (or any other device) to respond to ping, yet be confused enough to not want to talk HTTP/FTP/Other. E.g. will ping, but drops the connection when you try and get a jpg.

I too have a regular ping-a-thon script running across my network for everything, to check what's there, also logging the round-trip time, to spot network bogging down incidents.

It's a good "is it plugged in and powered?" test, but not for actual certainty of operation.

Your second idea, watching for meaningful data flow, might be more reliable.

As was pointed out elsewhere, ZoneMinder does know when a camera isn't playing ball, as it turns the monitor's status red in the web page. That would be a good thing to hook.
lpallard
Posts: 87
Joined: Fri Mar 05, 2010 10:59 pm

Re: Send emails if camera fails/goes offline?

Post by lpallard »

Perhaps a cheap hack, maybe something not so reliable that I would bet my paycheck on, but what about monitoring the monitor's status color code in the application's webpage?

AFAIK, html pages are using color codes, so if the color changes away from green, an alarm is sent by email, whatever..

I totally agree with mikb.. Ping only tells that the device is still electrically connected and that it still has a valid IP address... Useless for monitoring services or remote availability.
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

Re: Send emails if camera fails/goes offline?

Post by kylejohnson »

As others have said, a ping check doesn't actually check whether the service (camera) is functioning. A better solution might be to monitor syslog for ZM messages, which trigger when ZM is no longer able to monitor a camera's feed.

Good idea to submit a request here: https://github.com/ZoneMinder/ZoneMinde ... state=open
Idling as gnulnx in #zoneminder on freenode. Come say hi!
lpallard
Posts: 87
Joined: Fri Mar 05, 2010 10:59 pm

Re: Send emails if camera fails/goes offline?

Post by lpallard »

"Good idea to submit a request here: https://github.com/ZoneMinder/ZoneMinde ... state=open"


I did just before tyou replied! Talk about a good timing!

EDIT: Actually, I cannot find my ticket. Either it is being reviewed for approval by an admin, or the crappy IE8 browser that I am using on this computer did not actually post the ticket when I wrote it.... Wouldn't be surprising
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

Re: Send emails if camera fails/goes offline?

Post by kylejohnson »

lpallard wrote:"Good idea to submit a request here: https://github.com/ZoneMinder/ZoneMinde ... state=open"


I did just before tyou replied! Talk about a good timing!

EDIT: Actually, I cannot find my ticket. Either it is being reviewed for approval by an admin, or the crappy IE8 browser that I am using on this computer did not actually post the ticket when I wrote it.... Wouldn't be surprising
I don't see it there. :(
Idling as gnulnx in #zoneminder on freenode. Come say hi!
lpallard
Posts: 87
Joined: Fri Mar 05, 2010 10:59 pm

Re: Send emails if camera fails/goes offline?

Post by lpallard »

Yeah f**** retarted internet explorer....

I'll reopen it

:evil:
lpallard
Posts: 87
Joined: Fri Mar 05, 2010 10:59 pm

Re: Send emails if camera fails/goes offline?

Post by lpallard »

Oh God, .....

Finally I went to post another unrelated ticket on guithub when I noticed that my initial ticket I had opened for the feature requested here had been posted days later on the ticket list. So i have closed my ticket 228 and using 227 as of now....
Locked