Monitor nginx via Prometheus

This commit is contained in:
2023-04-18 21:18:38 +02:00
parent 841ee6758d
commit 80259e6afd
2 changed files with 19 additions and 7 deletions

View File

@@ -56,8 +56,11 @@ with pkgs;
wireguard.enable = true;
postgres.enable = true;
smartctl.enable = true;
#nginx.enable = true;
dnsmasq.enable = true;
nginx = {
enable = true;
scrapeUri = "http://localhost:8282/nginx_status";
};
};
scrapeConfigs = [{
job_name = "zion";
@@ -77,6 +80,9 @@ with pkgs;
"localhost:${
toString config.services.prometheus.exporters.dnsmasq.port
}"
"localhost:${
toString config.services.prometheus.exporters.nginx.port
}"
"localhost:9641"
];
}];