Detecting RED status on cameras

Forum for questions and support relating to the 1.24.x releases only.
Locked
Champignol
Posts: 4
Joined: Wed Mar 16, 2011 12:23 am

Detecting RED status on cameras

Post by Champignol »

Hi all!
First, I've been using this products for quite some time now and am really pleased with it and want to take this opportunity to thank everyone participating in the development of this fine open source product.

Now, I'm trying to detect in the different logs when a camera source in zm is not capturing. I have found that /var/log/messages will log events like "unable to connect to camera" when an ip camera is physically offline but I'm having difficulty detecting in the logs when a camera is online but red in zm thus not capturing for whatever reason.

The main reason is to automate alerting on such events thru an external program like splunk, zabbix, nagios, etc...

So the question is: What events are actully logged when a camera source in zm turns red and stops capturing events?

Many thanks in advance for your help.

Champignol
Last edited by Champignol on Thu Mar 17, 2011 6:36 am, edited 1 time in total.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Detecting orange status on cameras

Post by bb99 »

When monitor function and source turn orange you have set the function to monitor. Nothing is saved and nothing is analysed, you simply have a camera connected that can be viewed.
Champignol
Posts: 4
Joined: Wed Mar 16, 2011 12:23 am

Re: Detecting orange status on cameras

Post by Champignol »

Thanks for your answer but I haven't changed the camera functions. They are in mocord mod always for years now.
The problem is that sometimes a camera source will turn orange by itself because of other conditions outside my control.

What I really need is a way to be alerted when a camera turns orange by itself without having to whatch the actual web interface myself 24/7. I also know that zm doesn't do email alerting so I want to detect that condition whithin the logs themselves so I can you an external monitoring/alerting system.

Do you know what events are logged when such problem occurs?

Thanks again for taking the time
Champignol
Posts: 4
Joined: Wed Mar 16, 2011 12:23 am

Re: Detecting RED status on cameras

Post by Champignol »

Just realized I should of said RED instead of ORANGE!
Stoopid mistake Iknow .

Sorry guys :-)

Anyone knows which specific event is logged and where when zm turns the camera red?
Thanks for your time

Champignol
Da Big Red Mushroom says: A Man Eater Must Scare Ya...
cadere
Posts: 4
Joined: Thu Mar 03, 2011 1:50 am

Re: Detecting RED status on cameras

Post by cadere »

Red means that the zmc daemon(capture) has crashed or has been turned off. orange means that zmc is running but zma (analysis) daemon has crashed or been turned off. I was having issues with them crashing and found some clues in /var/log/messages.
Look at your events for that camera see when it stopped recording then check the "messages" to see what happened right then.
I was getting buffer overruns....

How to get it to then alert you to what malfunction occurred is beyond me but this will give you a starting point.
Champignol
Posts: 4
Joined: Wed Mar 16, 2011 12:23 am

Re: Detecting RED status on cameras

Post by Champignol »

Yes indeed I have done all that before I came here.

Digging for errors, I find error events but they also come up when the camera is still green. It's like if ZoneMinder will turn the camera Red after a certain amount of time or number of recurring error but does not clearly log the turning of the camera to RED which would be very easy to track unless I it does and I fail in locating it!

If I could find the documentation of all event messages and when they are logged it could help me but alas I have no idea where it is. So if someone knows anything about which event log message that is logged when and only when a camera source shanges status from green to red or orange PLEASE let me know. :-)

As for generating an alert on that condition afterwards, it's really not a problem with products lilke nagios, zenoss to zabbix to name a few. But I need a clear cut event to start with! I can't really rely on ZoneMinder running in the background as a surveillance system if I can't be notified is some way when a cam goes red or orange whitout having someone in front of the screen 24/7

Many many thanks for your time

Champignol :-)
cadere
Posts: 4
Joined: Thu Mar 03, 2011 1:50 am

Re: Detecting RED status on cameras

Post by cadere »

Yeah that was confusing to me as well. There doesn't seem to be a separate error message that means "failure now the source color is red" The different colors seem to indicate only whether the daemon is running or not. So many things can cause the daemon to crashor exit normally. And to further complicate things if the daemon only crashes occasionally zoneminder immediately restarts the process and you won't notice it going red. Only if the daemon is consistently crashing does it start to space out the restarts until it hit the max wait time before restarts. This is the delay listed in the options window under the system tab called "MAX_RESTART_DELAY"
Anyway maybe you know all this already but the one thing I'm trying to say is that as far as I can tell the color changes are not logged as a particular event. They only mean that the daemon is not running for whatever reason which may or may not have beeen logged in any one particular place....

At this point I will shutup and hopefully someone more knowledgeable will chime in.

Good luck!
Locked