monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Monit mail-format specific to each alert


From: monj wf
Subject: Monit mail-format specific to each alert
Date: Tue, 24 Mar 2015 17:07:53 -0400

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: address@hidden 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 }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]