diff options
Diffstat (limited to 'ops/machines')
-rw-r--r-- | ops/machines/whitby/default.nix | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix index dbee33aa3f1f..968b5c4ea58d 100644 --- a/ops/machines/whitby/default.nix +++ b/ops/machines/whitby/default.nix @@ -483,14 +483,23 @@ in { # Prometheus is inside the respective service modules. services.prometheus = { enable = true; - exporters.node = { - enable = true; - enabledCollectors = [ - "logind" - "processes" - "systemd" - ]; + exporters = { + node = { + enable = true; + + enabledCollectors = [ + "logind" + "processes" + "systemd" + ]; + }; + + nginx = { + enable = true; + sslVerify = false; + constLabels = [ "host=whitby" ]; + }; }; scrapeConfigs = [{ @@ -499,6 +508,12 @@ in { static_configs = [{ targets = ["localhost:${toString config.services.prometheus.exporters.node.port}"]; }]; + } { + job_name = "nginx"; + scrape_interval = "5s"; + static_configs = [{ + targets = ["localhost:${toString config.services.prometheus.exporters.nginx.port}"]; + }]; }]; }; |