From 39496985f96b6e61f23e771a80cc020d6a833868 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 21 Oct 2022 02:15:07 -0700 Subject: [PATCH] servo: add `munin` for monitoring/metrics --- machines/servo/services/default.nix | 1 + machines/servo/services/munin.nix | 12 ++++++++++++ machines/servo/services/nginx.nix | 7 +++++++ 3 files changed, 20 insertions(+) create mode 100644 machines/servo/services/munin.nix diff --git a/machines/servo/services/default.nix b/machines/servo/services/default.nix index d51e5deaa..a54d9bbec 100644 --- a/machines/servo/services/default.nix +++ b/machines/servo/services/default.nix @@ -8,6 +8,7 @@ ./jackett.nix ./jellyfin.nix ./matrix + ./munin.nix ./navidrome.nix ./nginx.nix ./pleroma.nix diff --git a/machines/servo/services/munin.nix b/machines/servo/services/munin.nix new file mode 100644 index 000000000..7669fd4a6 --- /dev/null +++ b/machines/servo/services/munin.nix @@ -0,0 +1,12 @@ +{ config, ... }: +{ + services.munin-node.enable = true; + services.munin-cron = { + enable = true; + # collect data from the localhost + hosts = '' + [${config.networking.hostName}] + address localhost + ''; + }; +} diff --git a/machines/servo/services/nginx.nix b/machines/servo/services/nginx.nix index 69d3f9fc3..3f17d3ca7 100644 --- a/machines/servo/services/nginx.nix +++ b/machines/servo/services/nginx.nix @@ -57,6 +57,13 @@ # }; }; + # server statistics + services.nginx.virtualHosts."sink.uninsane.org" = { + addSSL = true; + enableACME = true; + root = "/var/www/munin"; + }; + # Pleroma server and web interface services.nginx.virtualHosts."fed.uninsane.org" = { addSSL = true;