-
assigned issue to
Monit status output of Waiting for status and monitor status is confusing
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/sensu-client.pid 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?
Thanks
Comments (9)
-
repo owner -
repo owner Hello,
fixed in the development version, you can get it here: https://bitbucket.org/tildeslash/monit/get/master.tar.gz
To compile:
tar -xzf master.tar.gz cd tildeslash* ./bootstrap ./configure make
Regards
-
repo owner - changed status to resolved
fix will be part of next release (monit 5.11)
-
reporter Great. Thanks for the quick fix.
-
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".
-
repo owner Jochen, please can you provide related Monit configuration + screenshot?
-
monitrc:
check program hello with path "/root/hello_world.sh" every 100 cycles if status != 0 then alert
where "/root/hello_world.sh" 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.
-
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).
-
repo owner - removed version
Removing version: 5.9 (automated comment)
- Log in to comment