You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nixos-template-base/public/service-monitoring-munin.nix

50 lines
1.0 KiB
Nix

{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkMerge mkThenElse;
cfg = config.r6d.config-generator;
computers = config.r6d.computers;
profiles = config.r6d.profiles;
in
mkIf true {
# Paquets
environment.systemPackages = with pkgs; [
8 years ago
bc
mailutils
];
# Services
## Noeud de supervision munin = pas de stockage des données locales
services.munin-node = {
enable = true;
};
systemd.services.munin-node = {
8 years ago
path = with pkgs; [ munin lm_sensors ];
serviceConfig.TimeoutStartSec = "3min";
};
## Munin server -- generate /var/www/munin
services.munin-cron = {
enable = true;
hosts = ''
[${config.networking.hostName}]
address 127.0.0.1
'';
extraGlobalConfig = ''
contact.email.command ${pkgs.mutt}/bin/mutt -F /etc/nixos/base/public/munin-muttrc -s "Munin notification for ''${var:host}" jean-pierre@ocean.prunetwork.fr
'';
};
# Réseau
networking.firewall = {
allowedTCPPorts = [
#8000
];
allowedUDPPorts = [
];
};
}