Hi
This is my first try setting up monit on a server. I am hearing monit is a great app, and I am looking forward to having it monitor my apps and give me peace of mind, once I get so far...

I have set up a bunch of services which can be started manually like this:

sudo /etc/init.d/worker1
sudo /etc/init.d/worker2
sudo /etc/init.d/scheduler
sudo /etc/init.d/beanstalkd

When starting them manually everything works like a charm. The processes therefore seem to work the way I intend them to.

When trying to start them using monit, it tells me it can't start the processes and unmonitors them. If, on the other hand, the processes already run when I start monit, monit sees them and sets their state to running and tells me it is monitoring them. That is not to reassuring though, because if monit needs to restart the process it probably wont be able to, and then part of the reason for having monit running disappears!

The monit configuration for the processes look like this:

check process worker1 with pidfile "/home/sebastian/public_html/kle.io/ shared/log/Worker1.pid"
        start program = "/etc/init.d/worker1 start"
        stop program = "/etc/init.d/worker1 stop"
        if cpu usage is greater than 90 percent for 2 cycles then alert
        if cpu usage > 98% for 5 cycles then restart
        if 2 restarts within 3 cycles then timeout
        group workers
        depends on beanstalkd

check process worker2 with pidfile "/home/sebastian/public_html/kle.io/ shared/log/Worker2.pid"
        start program = "/etc/init.d/worker2 start"
        stop program = "/etc/init.d/worker2 stop"
        if cpu usage is greater than 90 percent for 2 cycles then alert
        if cpu usage > 98% for 5 cycles then restart
        if 2 restarts within 3 cycles then timeout
        group workers
        depends on beanstalkd

check process beanstalkd with pidfile "/var/run/beanstalkd.pid"
        start program = "/etc/init.d/beanstalkd start"
        stop program = "/etc/init.d/beanstalkd stop"
        if cpu usage is greater than 10 percent for 2 cycles then alert
        if cpu usage > 98% for 5 cycles then restart
        if 2 restarts within 3 cycles then timeout

Thanks in advance!

Best regards
Sebastian




--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to