From 5380bb76b003709810c81252fb7bffaf0dcbdd60 Mon Sep 17 00:00:00 2001 From: Jean-Pierre PRUNARET Date: Fri, 22 Jul 2016 16:16:25 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20du=20monitoring=20local=20(d=C3=A9place?= =?UTF-8?q?ment=20depuis=20server)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base.nix | 1 + monitoring.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 monitoring.nix diff --git a/base.nix b/base.nix index 984f0a6..f0397a7 100644 --- a/base.nix +++ b/base.nix @@ -4,6 +4,7 @@ imports = [ ./environment.nix ./localisation.nix + ./monitoring.nix ./networking.nix ./services.nix diff --git a/monitoring.nix b/monitoring.nix new file mode 100644 index 0000000..1198826 --- /dev/null +++ b/monitoring.nix @@ -0,0 +1,27 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + ## Munin server -- generate /var/www/munin + services.munin-cron = { + enable = true; + hosts = '' + [${config.networking.hostName}] + address localhost + ''; + extraGlobalConfig = '' + contact.email.command mail -s "Munin notification for ''${var:host}" hostmaster@prunetwork.fr + ''; + }; + + networking.firewall.allowedTCPPorts = [ + # TODO configurer les bon ports lors de l'ouverture du service + ]; + + ## Documentation + # * https://nixos.org/wiki/Create_and_debug_nix_packages + # * http://chriswarbo.net/essays/nixos/developing_on_nixos.html +}