|
From: | pippo pippo |
Subject: | Re: How to check the uptime of a Ruby process. |
Date: | Mon, 30 Jul 2012 16:21:02 +0100 (BST) |
Hi Martin.My Monit is version 5.3.2.This is strange because I installed Monit 2 days ago through the Ubuntu command apt-get install monit.How can I upgrade my Monit version?Bye.K84PD5
Da: Martin Pala <address@hidden>
A: pippo pippo <address@hidden>
Cc: This is the general mailing list for monit <address@hidden>
Inviato: Lunedì 30 Luglio 2012 15:51
Oggetto: Re: How to check the uptime of a Ruby process.
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 -VRegards,MartinOn Jul 30, 2012, at 12:17 PM, pippo pippo <address@hidden> wrote:Hi Martin.I try to do this with the following code: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 alertBut I have the following code:/etc/monit/conf.d/ruby.monit:8: Error: syntax error 'uptime'K84PD5
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 alertRegards,martinOn Jul 30, 2012, at 11:55 AM, pippo pippo <address@hidden> wrote:--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] |