- edited description
monit report [up | down | initialising | unmonitored] - condition or health of monitored services
From https://twitter.com/mpfz0r/status/715821886207299584 It should be possible for an external program/script to query the status of Monit and easily parse the output. We suggest a new command monit report [up | down | initialising | unmonitored]
. If called without optional arguments the output looks like:
up: 10 (65%)
down: 4 (10%)
initialising: 7 (20%)
not monitored: 2 (5%)
Calling monit report up
results in this output:
10 of 23
Same type of output for monit report down, initialising and unmonitored
. If command succeed monit returns 0 otherwise 1 (typically if the monit deamon is not running )
Comments (4)
-
reporter -
reporter - changed status to resolved
fix issue
#340: added a CLI report command→ <<cset 2687d9d9e943>>
-
The wording "up|down" is unfortunate, because a filesystem check where (say) 90% of the space is used is reported as "down" in report output, while it's reported as "Resource limit matched" in summary output. Wouldn't it be better to use "ok|problem" or (at least) "up|fail"?
-
reporter I see your point, but for this command and in this scenario I think it is fine.
- Log in to comment