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}" [email protected]
contact.web_group.always_send warning critical
contact.db_group.command mail -s "MUNIN - ${var:group} :: ${var:host}" [email protected]
contact.db_group.always_send warning critical
contact.itgroup.command mail -s "MUNIN - ${var:group} :: ${var:host}" [email protected]
contact.itgroup.always_send warning critical
### Contact Groups
[web_servers;]
contacts web_group
[db_servers;]
contacts db_group itgroup
### Servers
[web_servers;web-01]
address 192.168.122.5
use_node_name yes
[web_servers;web-02]
address 192.168.122.6
use_node_name yes
[db_servers;db-01]
address 192.168.122.7
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 ‘[email protected]’. And if a database server has an issue, the notification will go to both ‘[email protected]’ and ‘[email protected]’.