Unneeded (un)monitor failed alert

Issue #283 resolved
Former user created an issue

Hi!

While I am here: Love the software! Thanks so much for creating such a great tool!

We have added a rule to watch a process in Monit. Only, when we manually (un)monitor the rule, we get an alert that the action failed. The command used is:

#!
sudo monit (un)monitor <rule name>

The rule is actually very simple:

#!
check process <name>  with pidfile <Checked the pid file is there>
        start program = <restart command>
        stop program = <stop command>
        every 1 cycles
        if 2 restarts within 3 cycles then unmonitor

The rule name and the process name are coincidently the same. We get an alert as an email:

#!
Action done Service <rule name>

    Date:        Wed, 11 Nov 2015 10:20:54
    Action:      alert
    Host:        <hostname>
    Description: monitor action failed

Your faithful employee,
Monit

And it is also in the log:

#!
[CET Nov 11 10:20:59] info     : Monit daemon with PID 29883 awakened
[CET Nov 11 10:20:59] info     : Awakened by User defined signal 1
[CET Nov 11 10:20:59] info     : '<rule name>' monitor action failed

It might be that we are causing this problem, but as the testcase is so simple, we think it might be a bug. Could someone have a look at this?

Thanks in advance!

Comments (6)

  1. Former user Account Deleted

    Either calling the command as:

    #!
    /usr/bin/sudo monit (un)monitor <rule name>
    

    Or as the user root:

    #!
    monit (un)monitor <rule name>
    

    Still causes the alert and a log that the action failed. (Even though it actually succeeds :P)

  2. Former user Account Deleted

    Might it be that the alert is as intended but only the description is wrong which gives a false interpretation?

  3. Log in to comment