unmonitor until next monit daemon restart; passive only for one check instance
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)
-
reporter -
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 ?
-
repo owner In what context will monit be restarted? There is an "onreboot" statement that will reset the unmonitor state when the machine reboots, maybe it can solve your issue?: https://mmonit.com/monit/documentation/monit.html#SYSTEM-REBOOT-AND-SERVICE-STARTUP
-
repo owner regarding the passive mode ... please can you provide more details? I don't understand the request
-
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
-
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 ?
-
repo owner I think the existing "onreboot" statement should fix the problem.
-
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
- Log in to comment
I see now the issue #753, I think they are asking a feature similar to my passive proposal.