Filtering: Syntax for Signal Lost Event?

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
canut
Posts: 8
Joined: Fri Jan 11, 2013 8:43 pm

Filtering: Syntax for Signal Lost Event?

Post by canut » Wed May 20, 2015 4:47 pm

Hi,

Some of my IP cams will occasionally crap out on me with a 'Signal: Lost' log file entry. What's the nomenclature for this in filter speak? So far, I've tried [Notes|Cause] + [equal to|matches] + 'Signal: Lost', but to no avail. This is Zoneminder v. 1.25.0 on a Debian 7.6 box with working e-mail notification via SMTP on localhost.

Any pointers greatly appreciated!

Thanks, Mike

mikb
Posts: 489
Joined: Mon Mar 25, 2013 12:34 pm

Re: Filtering: Syntax for Signal Lost Event?

Post by mikb » Wed May 20, 2015 6:29 pm

I fear you may be looking in the wrong place -- I'd be happy for someone to shoot this down though :)

If you are using the "filters" tab, that is for filtering Events -- that's where I see "Notes" and "Cause" fields.

You're not looking for events, but for log entries -- I don't think an event is created for "Signal Loss"

The filtering under the "Logs" tab (top right on 1.25) isn't as flexible as that for events, but at least it's the right place to be looking.

Failing that,

Code: Select all

grep  "Signal: Lost" /var/log/zm/zm.log
may get you somewhere by hand :)

canut
Posts: 8
Joined: Fri Jan 11, 2013 8:43 pm

Re: Filtering: Syntax for Signal Lost Event?

Post by canut » Sun May 24, 2015 6:09 pm

Hey,

I think you might be on to something here :) Before I go a bash-ing my log entries, can someone please confirm?

Bests, Mike

canut
Posts: 8
Joined: Fri Jan 11, 2013 8:43 pm

Re: Filtering: Syntax for Signal Lost Event?

Post by canut » Mon May 25, 2015 7:56 pm

Well, to add insult to injury, a 'Signal: Reacquired' will actually trigger a filterable event (via 'cause' => 'Signal'). Same daemon (zm_monitor) AFAIK, so where do I need to start digging?

User avatar
asker
Posts: 1476
Joined: Sun Mar 01, 2015 12:12 pm

Re: Filtering: Syntax for Signal Lost Event?

Post by asker » Tue May 26, 2015 7:21 pm

What exactly are you trying to do? Your original post wasn't clear about what your goal was.
Are you trying to prevent an event from being logged if you have a Signal Loss?

https://github.com/ZoneMinder/ZoneMinde ... .cpp#L1410
https://github.com/ZoneMinder/ZoneMinde ... .cpp#L1469

are the places where an Event is created. If you go through that file, you will find various parts of the code that sets signal and last_signal to start/stop signal recording conditions. If you want to dig around, I suspect reading that file carefully and masking out the event creation (and event stop) for a signal change is probably what you will need to do and re-compile. I don't think there is any way to do it without changing code.Obviously, change comes at its own peril - please make sure you take care of doing a clean job of it by assessing if any other condition will be affected.

If instead you are looking at a way to delete all events of type 'signal' after they are created in a scheduled fashion, filters is probably the way to go ==> filter by cause field - it will be Signal for the events you want to process/delete
canut wrote:Well, to add insult to injury, a 'Signal: Reacquired' will actually trigger a filterable event (via 'cause' => 'Signal'). Same daemon (zm_monitor) AFAIK, so where do I need to start digging?
Please don't ask me questions via PM. Feel free to post in the forums or Github

My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

canut
Posts: 8
Joined: Fri Jan 11, 2013 8:43 pm

Re: Filtering: Syntax for Signal Lost Event?

Post by canut » Sun May 31, 2015 3:54 pm

My apologies for being a bit unclear in my initial posting. I would like to get notified by e-mail about a signal loss for any of those cameras. This appears to be working for 'Signal: Reacquired' events but not for 'Signal: Lost'. Kudos, BTW, for your great work explaining ZM's zoning system! This cleared up for me a couple of concepts that have been puzzling me for a while.

Bests, Mike

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests