I've configured monit tests and alerts — but I want to make sure that everything in my alert stack (outgoing email servers, sms email gateways…) is functioning properly. Is there a handy way to fire off a dummy test alert?
Asked
Active
Viewed 1.9k times
2 Answers
19
I usually restart a trivial service (like ntp) that I'm monitoring in order to test the alerts.
I did find this suggestion in the mailing list archives...
It's a way to leverage the alert reminder functionality in Monit to ensure that the alert path is functioning properly. Basically, a periodic reminder. Tune the cycle to your liking and you'll be able to control the testing time.
check file alerttest with path /.nonexistent
alert address@hidden with reminder on 500 cycles
ewwhite
- 194,921
- 91
- 434
- 799
-
A [dead man's switch](http://en.wikipedia.org/wiki/Dead_man%27s_switch), nice! – John Bachir Nov 07 '11 at 23:23
8
Even easier is to just reload the config file and wait for the "Monit instance changed.."-email. Just run:
monit reload
nylund
- 211
- 2
- 2
-
3Doesn't work if the recipient is defined using `set alert manager@foo.bar not on { instance, action }` – VCD Jun 26 '16 at 08:31