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
with timeout 60 seconds then alert
set MAIL-FORMAT {from: address@hidden message: Scrape failed for host1}
with timeout 60 seconds then alert
set MAIL-FORMAT {message: Scrape failed for host2}
if failed ping with timeout 60 seconds then alert
set MAIL-FORMAT {message: failed ping to host3}
if failed ping with timeout 60 seconds then alert
set MAIL-FORMAT {message: failed ping to host4 }