Monit status output of Waiting for status and monitor status is confusing

Issue #114 resolved
Kevin Hicks
created an issue

Running with monit 5.5 (but have also reproduced this behavior on monit 5.10)

Have monit configs that use every x cycles like so: check process sensu-client with pidfile /var/run/sensu/ every 10 cycles

Many support folks aren't familiar with the actual monit config files, but use the command monit status to check basic system sanity. 90% of the time they end up seeing output like so: Process 'sensu-client' status Waiting monitoring status Waiting

People are constantly confused as to what Waiting means when they see other processes that aren't using the every X cycles as Running. They either think the process is not running or that monit is stuck waiting for the process to start even though the process is running just fine.

And only 10% of the time do they get this output: Process 'sensu-client' status Running monitoring status Monitored

I assume it's only showing the Running state when the previous cycle was the 10th cycle when it actually check the process.

Is this by design or a bug? Could this output be improved so that it somehow indicates the status the last time monit actually checked the process?


Comments (9)

  1. Jochen Ott

    It seems this is not really fixed: I can observe the described behavior with monit 5.11, i.e. status is displayed mostly as "waiting" for checks with "every XXX cycles".

  2. Jochen Ott


    check program hello with path "/root/"
       every 100 cycles
       if status != 0 then alert

    where "/root/" is a simple dummy script. Screenshort after "monit reload" (and waiting a bit more than 1 cycle, s.t. everything is typically executed twice):


    The "dns" and "dns-extern" programs (also executed only every 100th cycle) used to work fine before I included the hello world script and reloaded monit. Therefore, I suspect this problem only appears right after starting or reloading monit.

  3. Tildeslash repo owner

    Thanks for data Jochen. Yes, the "Waiting" status is displayed until the first test will finish. When your start Monit, the "every 100 cycles" makes it to postpone the first test by 100 cycle as well => it's not bug (before Monit 5.11 the "Waiting" state was displayed even after the first test, which was wrong).

  4. Log in to comment