|
From: | Paul Theodoropoulos |
Subject: | Re: Not understanding 'Program Status Testing' |
Date: | Wed, 23 Jul 2014 13:06:24 -0700 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
On 7/22/14 2:32 AM, Vincent WATREMEZ wrote:Thanks Vincent - I figured out part of it. It wasn't privileges, it was paths - monit maintains a very strict and limited path. When I ran the script myself as root on the command line, it worked fine. But within monit, it actually wanted my test script to be this, with all paths spelled out: #!/bin/sh /usr/local/bin/bucardo.pl status |/bin/grep trumgr|/usr/bin/cut -d"|" -f4|/bin/grep ".m" >/dev/null 2>&1 exit $? Now monit correctly understands when the test fails: Program 'bucardo.monitor' status Status failed monitoring status Monitored last started Wed, 23 Jul 2014 13:01:36 last exit value 0 data collected Wed, 23 Jul 2014 13:01:36 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.
-- Paul Theodoropoulos www.anastrophe.com |
[Prev in Thread] | Current Thread | [Next in Thread] |