RE: monit send alerts for different cycles fails to different e-mail addresses
[email protected] Mon, 04 Sep 2023 07:26:52 GMT
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <[email protected]> |
Hello Mesut, This is the way how Monit handle the alert statement, see https://mmonit.com/monit/documentation/monit.html#Setting-an-alert-recipient You can set the alert target (a email) using the global "set alert" statement or the "alert" statement in the context of a service entry. But you can not set a email address in a context of a test. You can check the behaviour by using "monit -v" to get some Monit internal information about the configuration. Remote Host Name = Cluster0 Admin Panel Address = 192.168.5.80 Monitoring mode = active On reboot = start Port = if failed [192.168.5.80]:4443 type TCP/IP protocol HTTP with timeout 10 s using TLS then alert Port = if failed [192.168.5.80]:4443 type TCP/IP protocol HTTP with timeout 10 s using TLS for 3 cycles then alert Alert mail to = [email protected] Alert on = All events Alert mail to = [email protected] Alert on = All events This looks like this, based on your sample. Lutz -----ursprüngliche Nachricht----- Von: [email protected] Gesendet: 05.07.2023 16:38 Uhr An: [email protected] Betreff: monit send alerts for different cycles fails to different e-mail addresses how can I set alerts for different cycles fails to different users (something like that) for the same service in monit? I have tried the config like this below. check host "Cluster0 Admin Panel" with address 192.168.5.80 if failed port 4443 protocol https with timeout 10 seconds for 3 cycles then alert [email protected] if failed port 4443 protocol https with timeout 10 seconds then alert [email protected] But syntax error occurred on the e-mail address lines. this one sent emails to both users at 1st cycle and 3rd cycle check host "Cluster0 Admin Panel" with address 192.168.5.80 if failed port 4443 protocol https with timeout 10 seconds for 3 cycles then alert alert [email protected] if failed port 4443 protocol https with timeout 10 seconds then alert alert [email protected] -----ursprüngliche Nachricht Ende-----