On 7/23/14 1:06 PM, Paul Theodoropoulos wrote:
Which is all great - except that it never generates an alert! I've confirmed that my other checks generate alerts - only this one fails to do so. I have of course tried reversing the status checks, etc - no joy. So I'm still stuck.
I see the following in my daemon logs as the monitor is run:

Jul 23 13:29:41 localhost monit[1304]: 'bucardo.monitor' status succeeded
Jul 23 13:30:41 localhost monit[1304]: 'bucardo.monitor' '/usr/local/bin/bucardo.monitor.sh' failed with exit status (0) -- no output from program Jul 23 13:31:01 localhost monit[1304]: 'bucardo.monitor' '/usr/local/bin/bucardo.monitor.sh' failed with exit status (0) -- no output from program

The exit status is what I expect, but this seems as if monit is complaining about the expected exit status of zero - my failure status. So, I reversed the exit output as a test -

#!/bin/sh
/usr/local/bin/bucardo.pl status |/bin/grep trumgr|/usr/bin/cut -d"|" -f4|/bin/grep ".m" >/dev/null 2>&1
STATUS=$?
if [ "${STATUS}" -eq "1" ];then
    exit 0
else
    exit 1
fi

But still no joy:

Jul 23 13:37:39 localhost monit[1304]: 'bucardo.monitor' '/usr/local/bin/bucardo.monitor.sh' failed with exit status (1) -- no output from program Jul 23 13:37:59 localhost monit[1304]: 'bucardo.monitor' '/usr/local/bin/bucardo.monitor.sh' failed with exit status (1) -- no output from program Jul 23 13:38:19 localhost monit[1304]: 'bucardo.monitor' '/usr/local/bin/bucardo.monitor.sh' failed with exit status (1) -- no output from program

I'd be awfully surprised if I've found a bug, but I'm fully at a loss at this point.

--
Paul Theodoropoulos
www.anastrophe.com


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to