monit report [up | down | initialising | unmonitored] - condition or health of monitored services

Issue #340 resolved
Tildeslash repo owner created an issue

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)

  1. Ulrich Windl

    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"?

  2. Log in to comment