Files
nixos-template-base/public/service-monitoring-munin.nix

47 lines
934 B
Nix
Raw Normal View History

2016-08-12 12:46:36 +02:00
{ config, lib, pkgs, ... }:
2016-08-12 12:46:36 +02:00
let
inherit (lib) mkIf mkMerge mkThenElse;
cfg = config.r6d.config-generator;
computers = config.r6d.computers;
profiles = config.r6d.profiles;
in
2016-08-12 12:46:36 +02:00
mkIf true {
# Paquets
environment.systemPackages = with pkgs; [
2017-01-24 22:24:49 +01:00
bc
mailutils
];
2016-08-12 12:46:36 +02:00
# Services
## Noeud de supervision munin = pas de stockage des données locales
services.munin-node = {
enable = true;
};
systemd.services.munin-node.serviceConfig.TimeoutStartSec = "3min";
2016-08-12 12:46:36 +02:00
## Munin server -- generate /var/www/munin
services.munin-cron = {
enable = true;
hosts = ''
[${config.networking.hostName}]
address 127.0.0.1
'';
extraGlobalConfig = ''
contact.email.command mail -s "Munin notification for ''${var:host}" root@${config.networking.hostName}
'';
};
2016-08-12 12:46:36 +02:00
# Réseau
networking.firewall = {
allowedTCPPorts = [
#8000
2016-08-12 12:46:36 +02:00
];
allowedUDPPorts = [
];
};
}