Dear Jaro,
              Thank you four help. I am wondering for mysql I start with
this command monit start mysql. THis will enable monit to monitor it
properly. So how about ossec how do you suggest it should be start with
monit? Another thing is that where is this pointing to /PATH/TO/FIRST/FILE ?


On Mon, Sep 23, 2013 at 5:15 AM, jsiemins <[email protected]>wrote:

> 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
>
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to