From 3a818ecc21c12f3148504f7acf178bc218197e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Mon, 2 Oct 2023 22:53:56 +0200 Subject: [PATCH] WIP: nginx: Add metrics --- configuration/default.nix | 2 ++ configuration/services/metrics.nix | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/configuration/default.nix b/configuration/default.nix index 610851a..dc05cd3 100644 --- a/configuration/default.nix +++ b/configuration/default.nix @@ -137,6 +137,8 @@ recommendedProxySettings = true; clientMaxBodySize = "10G"; domain = "tlater.net"; + + statusPage = true; # For metrics, should be accessible only from localhost }; security.acme = { diff --git a/configuration/services/metrics.nix b/configuration/services/metrics.nix index 12a48e0..51a654d 100644 --- a/configuration/services/metrics.nix +++ b/configuration/services/metrics.nix @@ -50,6 +50,16 @@ in { enabledCollectors = ["systemd"]; listenAddress = "127.0.0.1"; }; + + nginx = { + enable = true; + listenAddress = "127.0.0.1"; + }; + + nginxlog = { + enable = true; + listenAddress = "127.0.0.1"; + }; }; systemd.services.export-to-victoriametrics = let