|
From: | frwa onto |
Subject: | Re: Monitor Ossec |
Date: | Mon, 23 Sep 2013 16:41:29 +0800 |
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.
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |