[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: monit send alerts for different cycles fails to different e-mail add
From: |
lutz . mader |
Subject: |
RE: monit send alerts for different cycles fails to different e-mail addresses |
Date: |
Mon, 04 Sep 2023 07:26:52 GMT |
User-agent: |
freenet-api2 |
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 = userB@mydomain.com
Alert on = All events
Alert mail to = userA@mydomain.com
Alert on = All events
This looks like this, based on your sample.
Lutz
-----ursprüngliche Nachricht-----
Von: mesutgl@gmail.com
Gesendet: 05.07.2023 16:38 Uhr
An: monit-general@nongnu.org
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 userA@mydomain.com if
failed port 4443 protocol https with timeout 10 seconds then alert userB@mydomain.com
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 userA@mydomain.com
if failed port 4443 protocol https with timeout 10 seconds then alert alert
userB@mydomain.com
-----ursprüngliche Nachricht Ende-----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE: monit send alerts for different cycles fails to different e-mail addresses,
lutz . mader <=