All HowTo's

Munin Email Notifications – Different emails to different people

Send emails to different people for different servers (nodes) with Munin. Here is an example from a working “/etc/munin/munin.conf” file:

contact.web_group.command mail -s "MUNIN - ${var:group} :: ${var:host}" web_group@agix.local
contact.web_group.always_send warning critical

contact.db_group.command mail -s "MUNIN - ${var:group} :: ${var:host}" db_group@agix.local
contact.db_group.always_send warning critical

contact.itgroup.command mail -s "MUNIN - ${var:group} :: ${var:host}" itgroup@agix.local
contact.itgroup.always_send warning critical

### Contact Groups

        contacts web_group

        contacts db_group itgroup

### Servers

        use_node_name yes

        use_node_name yes

        use_node_name yes

In the above section of the ‘/etc/munin/munin.conf’ file, we have three email addresses (which could be distribution lists) that will receive emails for specific server issues. Ie, if a web server has issues, the notification will go to ‘web_group@agix.local’. And if a database server has an issue, the notification will go to both ‘db_group@agix.local’ and ‘itgroup@agix.local’.

Similar Posts: