unmonitor until next monit daemon restart; passive only for one check instance

Issue #773 new
Massimo Sala created an issue

Two features requests.

1) check ... if ... then unmonitor_until_restart

unmonitor until monit daemon will be restarted

2) passive

passive mode can be useful for specific check instance, vs a general "all or nothing" setting

Comments (8)

  1. Massimo Sala reporter

    For the 1st question, now I am trying this hack:

    check program bar with path "/foo/bar batz"
    # no more alerts, until daemon restart
        stop program = "/bin/true"
        if status != 0 then stop
    

    do you think is it a good, working solution ?

  2. Tildeslash repo owner

    regarding the passive mode ... please can you provide more details? I don't understand the request

  3. Massimo Sala reporter
    check ...
        start ...
        stop ...
        passive
    

    All the other checks are performed as usual, obeying the global parameter passive

    This specific check is in passive mode: monit only checks (gather the data), without taking actions.

    In the CLI and web, we can see the service. If start and stop actions are defined, we can manually do them.

    thks for your attention, M

  4. Massimo Sala reporter

    In what context will monit be restarted?

    Every morning we restart these servers (for other purposes).

    At the moment to silence a single check (after first alert), I am trying this

    check program bar with path "/foo/bar batz"
    # no more alerts, until daemon restart
        stop program = "/bin/true"
        if status != 0 then stop
    

    What do you think ?

  5. Massimo Sala reporter

    Fool me! I read the manual but I don't understand I can use passive in each single check instance. I will look at onreboot Thanks

  6. Log in to comment