[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: execute a command get results
From: |
Eric Pailleau |
Subject: |
Re: execute a command get results |
Date: |
Fri, 17 Dec 2010 17:09:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100624 Mandriva/3.0.5-0.1mdv2009.1 (2009.1) Thunderbird/3.0.5 |
Le 17/12/2010 16:44, Mike Zupan a écrit :
Is there anyway for monit to execute a command and get the returned
results and compare a number. Looking to test the number of items in a
queue via JMX
... exec "/usr/bin/test `JMX script that returns item queue number` -eq xxx &&
/bin/true || /bin/false "
where xxx the trigger number
"man test" for 'greater than' or 'lower than'
If a failure occurs (/bin/false) this will raise a monit error.
But a cron script may be certainly more usefull.
Let use monit for what it is done for , not for anything.