|
|
|
@ -48,9 +48,22 @@ mkIf flags.munin {
|
|
|
|
|
hosts = ''
|
|
|
|
|
[${config.networking.hostName}]
|
|
|
|
|
address 127.0.0.1
|
|
|
|
|
df._dev_sda2.warning 35
|
|
|
|
|
use_node_name yes
|
|
|
|
|
#contacts syslog
|
|
|
|
|
contacts email
|
|
|
|
|
'';
|
|
|
|
|
# http://sametmax.com/monitorez-vos-serveurs-avec-munin-et-notifications-par-email/
|
|
|
|
|
# http://guide.munin-monitoring.org/en/latest/tutorial/alert.html#syntax-of-warning-and-critical
|
|
|
|
|
extraGlobalConfig = ''
|
|
|
|
|
contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ''${var:host}" root@prunetwork.fr
|
|
|
|
|
#---
|
|
|
|
|
#contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ${config.networking.hostName}" root@ocean.prunetwork.fr
|
|
|
|
|
contact.email.command /run/current-system/sw/bin/mutt -F /etc/nixos/base/services/munin-muttrc -s "Munin notification for ${config.networking.hostName}" root@ocean.prunetwork.fr
|
|
|
|
|
contact.syslog.command /run/current-system/sw/bin/logger -p user.crit -t "Munin notification for ${config.networking.hostName}"
|
|
|
|
|
|
|
|
|
|
#---
|
|
|
|
|
contact.email.always_send ok,warning,critical,unknown
|
|
|
|
|
contact.syslog.always_send ok,warning,critical,unknown
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|