Wake up from "Not monitoring"
#!/bin/bash
/usr/bin/monit summary | tail -n +3 | grep -v "\sRunning$\|\sAccessible$" && /usr/bin/monit monitor all
exit 0
Is it possible to include it somehow?
Comments (4)
-
reporter -
repo owner Hello Viktor,
if there is requirement that if some service gets unmonitored the monitoring should be automatically enabled again, it could be better to not unmonitor the services at all (if it happens automatically).
The monitoring in monit can be disabled either manually using "unmonitor" or "stop" actions or automatically with "if x restarts within Y cycles then unmonitor" (or older syntax using "timeout"). If you have such restart timeout statement and don't want to disable the monitoring at any time, just remove it. Monit sends notification for manual unmonitor/stop actions, so the admin can be notified somebody changed the service state and as the reason for such action is unknown (for example deployment of newer service version is pending), it will be dangerous to enable the monitoring automatically without investigation of the situation.
-
reporter Thank you. So I should go through all my configs an delete
unmonitor
-s. -
reporter - changed status to invalid
- Log in to comment
It is a cron job.