Filter: sending notifications

Forum for questions and support relating to the 1.25.x releases only.
Locked
dma_k
Posts: 27
Joined: Sat Jan 19, 2013 5:58 pm

Filter: sending notifications

Post by dma_k »

Sorry, if I repeat somebody's question. Difficult to locate a duplicate post.

My question concerns filter functionality.

First of all, how is it possible to execute an arbitrary program and somehow pass %EI%, %EN%, … as arguments or as substituted template to STDIN? What is passed now, is only $event_path. I am thinking about patching the "send message" functionality of zmfilter.pl to actually feed the template output to a given executable (drop MIME::Lite fuzz). To send a message one need to pipe to sendmail -t -oi -oem – as simple as that.

In general I think that polling for events is not very smart tactics. If I set FILTER_EXECUTE_INTERVAL to 10 (seconds) there is still a possibility for intruder to pass the camera and switch off the power tumbler. Setting it to very low value (1 second) is an extra unnecessary overhead for the system. Can it be re-worked that events are actually pulled to filter, e.g. via pipe or named socket or any other publish/subscribe mechanism? I think that's most reliable.
Locked