The config loads fine on my testing system (monit 5.4) … as mentioned, the uptime test was added in monit 5.4 - please can you verify you have the correct monit version?:
monit -V
Regards, Martin
Hi Martin.
I try to do this with the following code:
set daemon 5 check process
ruby matching "^Rack: /home/capistrano/railsapp/current?|^Passenger ApplicationSpawner: /home/capistrano/railsapp/current?" if mem > 75% then alert if mem > 75% then exec "/bin/bash -c 'kill -s SIGTERM $MONIT_PROCESS_PID'" if cpu > 75% then alert if cpu > 75% then exec "/bin/bash -c 'kill -s SIGTERM
$MONIT_PROCESS_PID'" if uptime > 45 minutes then alert
But I have the following code:
/etc/monit/conf.d/ruby.monit:8: Error: syntax error 'uptime'
Da: Martin Pala <address@hidden> A: pippo pippo <address@hidden>; This is the general mailing list for monit <address@hidden> Inviato: Lunedì 30 Luglio 2012 12:01 Oggetto: Re: How to check the uptime of a Ruby process. Hi,
you can use the uptime test (available since monit
5.4):
check process ruby ... if uptime > 45 minutes then alert
Regards, martin
Hi.
I'm using Monit (version 5.4) to check the uptime of Ruby process on
my Ubuntu Server 12.04 LTS 32 bit.
Ruby doesn't have a PID file, so I find/check ruby process through the following monit code/configuration:
check process ruby matching "^Rack: /home/capistrano/railsapp/current?|^Passenger ApplicationSpawner: /home/capistrano/railsapp/current?"
Now I need to check uptime and if is greater then 45 minutes I must to alert. How can I do this?
Thanks in advance.
Regards.
K85PD5 -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
|