diff --git a/nixos/features/telemetry/nginx.nix b/nixos/features/telemetry/nginx.nix index 02e431f..948d443 100644 --- a/nixos/features/telemetry/nginx.nix +++ b/nixos/features/telemetry/nginx.nix @@ -1,11 +1,13 @@ { ... }: { - services.prometheus.exporters.nginx = { + services.prometheus.exporters.nginxlog = { enable = true; port = 14201; - scrapeUri = "http://localhost/nginx_status"; + settings = { + namespace.nginx.source.files = "/var/log/nginx/access.log"; + }; }; - networking.firewall.allowedTCPPorts = [ 14201 ]; + services.nginx.commonHttpConfig = "access_log /var/log/nginx/access.log"; - services.nginx.statusPage = true; + networking.firewall.allowedTCPPorts = [ 14201 ]; } diff --git a/nixos/hosts/ingress-proxy/default.nix b/nixos/hosts/ingress-proxy/default.nix index ab30e1d..add44d2 100644 --- a/nixos/hosts/ingress-proxy/default.nix +++ b/nixos/hosts/ingress-proxy/default.nix @@ -31,6 +31,7 @@ in { http3 = true; forceSSL = true; enableACME = true; + }; static = { src ? null, url ? null, rev ? null, aliases ? [] }: { serverAliases = aliases;