monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monitor Ossec


From: jsiemins
Subject: Re: Monitor Ossec
Date: Sun, 22 Sep 2013 14:15:35 -0700 (PDT)

I went to the same point and I made quick solution.

first file calls ossec-control and check staus:

#!/bin/bash
/var/ossec/bin/ossec-control status > /tmp/ossec-status
count=$(grep -c running /tmp/ossec-status)
if 
count=7
then
echo "running"
exit 0
elseif
echo "not running"
exit 1
fi
  
make it executable

Second is monit conf file:

check program OSSEC with path "/PATH/TO/FIRST/FILE" with timeout 1000
seconds
       if status != 0 then restart
start program = "/etc/init.d/ossec_server start" with timeout 60 seconds
stop program = "/etc/init.d/ossec_server stop"
group server








--
View this message in context: 
http://nongnu.13855.n7.nabble.com/Monitor-Ossec-tp3207p172740.html
Sent from the monit-general mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]