0

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 ?

Ionut
  • 1
  • 1

1 Answers1

0

Your are right, only one "set mail-format {}" statement is available to define the default mail format. Feel free to add a feature request via https://bitbucket.org/tildeslash/monit/issues.

lutzmad
  • 291