I have a very long monit file, with different rules. For certain rules, I want to send an email (with a specific format) to multiple email addresses.
I thought about using a Message Format, but we have different mail formats in the file, so I don't think this will work.
Currently, the only "solution" that we have is to repeat the following block for each alert:
check 1
alert email1@domain.com with mail-format {
<FORMAT 1>
}
alert email2@domain.com with mail-format {
<FORMAT 1>
}
check 2
alert email1@domain.com with mail-format {
<FORMAT 2>
}
alert email2@domain.com with mail-format {
<FORMAT 2>
}
Do you know how we could extract that mail format so we don't have to copy it over and over again ?