Service Monitoring

Forum for questions and support relating to the 1.29.x releases only.
Locked
Zmjm15
Posts: 90
Joined: Fri Jul 31, 2015 7:56 pm

Service Monitoring

Post by Zmjm15 »

Hi guys,

Was just wondering if anyone has managed to setup a monitoring service to alert when zoneminder service fails/stops?

Im just installing Monit and wondering how to implement it if anyone knows?


Many thanks
User avatar
iconnor
Posts: 2904
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Service Monitoring

Post by iconnor »

I use the following. Could probably be more robust.

check process zmdc.pl with pidfile /run/zm/zm.pid
if failed unixsocket /run/zm/zmdc.sock then restart
group zm
start program = "/bin/systemctl start zoneminder"
stop program = "/bin/systemctl stop zoneminder"
Zmjm15
Posts: 90
Joined: Fri Jul 31, 2015 7:56 pm

Re: Service Monitoring

Post by Zmjm15 »

No thats good i searched forum and found where youve given this script before and its been working great.

Now i just have to learn how to get email alerts from monit!

Many thanks
Locked