monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No failure return codes for monit status/monit summary when monit not ru


From: Daniel
Subject: No failure return codes for monit status/monit summary when monit not running
Date: Tue, 08 Nov 2005 11:39:19 +1300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050601

Hi

Just playing around, and monit doesn't return exit error codes for monit status/monit summary when monit isn't running. Could be handy for shell scripting or parsing monit output from the command line.

With monit running

address@hidden cron.daily]# ps -ef | grep monit
root     15574     1  0 11:28 ?        00:00:00 /usr/bin/monit -I
address@hidden cron.daily]# monit summary >/dev/null ; echo $?
0

After killing monit

address@hidden cron.daily]# ps -ef | grep monit
root     15478 14141  0 11:25 pts/2    00:00:00 grep monit
address@hidden cron.daily]# monit summary; echo $?
monit: no status available -- the monit daemon is not running
0
address@hidden cron.daily]# monit status; echo $?
monit: no status available -- the monit daemon is not running
0
address@hidden cron.daily]# ps -ef | grep monit
root     15530 14141  0 11:26 pts/2    00:00:00 grep monit


Regards

Daniel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]