Hi All

       I am very new to Monit so please pardon my noobness.

I have setup a couple of alerts and I would like to receive a very
descriptive email that is specific to every check. So I am using the "set
mail-format" for every check but looks like it is picking up the last
"mail-format" in the config file.

For instance I have 4 "mail-format" defined in my check for 4 different
checks and it is overwriting  the global one with the last one in the
config file.


What is the best way to achieve this ?


Here is what my config looks like


check host host1.example.com with address host1.example.com
     if failed url http://host1.example.com/dashboard.php with content =
"Zabbix 2.2.44"
     with timeout 60 seconds then alert
     set MAIL-FORMAT {from: monit@host1 message: Scrape failed for host1}
check host host2.csnzoo.com with address host2.example.com
     if failed url http://host2.example.com/dashboard.php with content =
"Zabbix 2.2.44"
     with timeout 60 seconds then alert
     set MAIL-FORMAT {message: Scrape failed for host2}
check host host3.csnzoo.com with address host3.csnzoo.com
     if failed ping with timeout 60 seconds then alert
     set MAIL-FORMAT {message: failed ping to host3}
check host host4.csnzoo.com with address host4.csnzoo.com
     if failed ping with timeout 60 seconds then alert
     set MAIL-FORMAT {message: failed ping to host4 }
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to