Option Logging for use with sec simple event correlator

Forum for questions and support relating to the 1.28.x releases only.
Locked
fennec
Posts: 59
Joined: Thu Mar 20, 2014 1:17 am

Option Logging for use with sec simple event correlator

Post by fennec »

Hi

i wan't to speed up alarm push on my iphone with a script

So i use sec simple event correlator who scan a log and start script when a word is find

I wan't that zoneminder log in file with specific value like

Code: Select all

09/28/15 12:41:06.710199 zma_m5[31656].INF-/build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp/1614 [porte: 35355 - Opening new event 56120, alarm start]
And when "alarm start" is find by sec he start script before alarm finished for push alert on my iphone and alert is send with less than 1s very fast alert

how can i configure zoneminder for log only "alarm start"

i try this

LOG_DEBUG=1
LOG_DEBUG_TARGET=_zma
LOG_DEBUG_LEVEL=1
LOG_DEBUG_FILE=/var/log/zm/zm_debug.log

all other option to none

but with that i have no "alarm stat" i only
"09/28/15 13:34:55.712815 zma_m4[19409].DB1-/build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_event.cpp/560 [Writing capture frame 28108]"

with a lot of log

if i do LOG_DEBUG_TARGET=""

it's ok i have "alarm stat" but lot lot lot log information

Do you have a solution for have a log with only this information

Code: Select all

09/28/15 12:41:06.710199 zma_m5[31656].INF-/build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp/1614 [porte: 35355 - Opening new event 56120, alarm start]
Thanks a lot for your helping
fennec
Posts: 59
Joined: Thu Mar 20, 2014 1:17 am

Re: Option Logging for use with sec simple event correlator

Post by fennec »

Ok for me

for information

start

Code: Select all

sudo mkdir /var/log/zm
sudo chown -R syslog:adm /var/log/zm
edit /etc/rsyslog.d/50-default.conf

Code: Select all

sudo nano 50-default.conf

Code: Select all

local1.=info    /var/log/zm/zm.log
*.*;auth,authpriv.none;local1.!*        -/var/log/syslog
*.=info;local1.!*;*.=notice;*.=warn;\
        auth,authpriv.none;\
        cron,daemon.none;\
        mail,news.none          -/var/log/messages
and with that you have only INFO in /var/log/zm/zm.log

and with sec
edit /etc/default/sec

Code: Select all

#Defaults for sec
RUN_DAEMON="yes"
DAEMON_ARGS="-conf=/etc/sec.conf -input=/var/log/zm/zm.log -pid=/var/run/sec.pid -detach -log=/var/log/sec.log"
and /etc/sec.conf

Code: Select all

type=single
ptype=RegExp
pattern=alarm(.+)start
desc=alarm
action=shellcmd /home/fennec/scripts/sec.sh $0
when sec find alarm start he start command sec.sh with $0 return full ligne

Code: Select all

09/28/15 12:41:06.710199 zma_m5[31656].INF-/build/zoneminder-3FpX3s/zoneminder-1.28.104-trusty/src/zm_monitor.cpp/1614 [porte: 35355 - Opening new event 56120, alarm start]
Locked