|
From: | pippo pippo |
Subject: | Re: How to check the uptime of a Ruby process. |
Date: | Mon, 30 Jul 2012 11:17:36 +0100 (BST) |
set daemon 5check process rubymatching "^Rack: /home/capistrano/railsapp/current?|^Passenger ApplicationSpawner: /home/capistrano/railsapp/current?"if mem > 75% then alertif mem > 75% then exec "/bin/bash -c 'kill -s SIGTERM $MONIT_PROCESS_PID'"if cpu > 75% then alertif cpu > 75% then exec "/bin/bash -c 'kill -s SIGTERM $MONIT_PROCESS_PID'"if uptime > 45 minutes then alert
/etc/monit/conf.d/ruby.monit:8: Error: syntax error 'uptime'
--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:Now I need to check uptime and if is greater then 45 minutes I must to alert. How can I do this?check process rubymatching "^Rack: /home/capistrano/railsapp/current?|^Passenger ApplicationSpawner: /home/capistrano/railsapp/current?"Thanks in advance.Regards.K85PD5
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
[Prev in Thread] | Current Thread | [Next in Thread] |