monitoring

This commit is contained in:
41666 2024-02-11 02:06:17 -05:00
parent c68bee3aca
commit c3b03cb167
2 changed files with 7 additions and 4 deletions

View file

@ -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 ];
}

View file

@ -31,6 +31,7 @@ in {
http3 = true;
forceSSL = true;
enableACME = true;
};
static = { src ? null, url ? null, rev ? null, aliases ? [] }: {
serverAliases = aliases;