1
0
Fork 0

add systemd node exporter

This commit is contained in:
ibizaman 2023-07-29 22:14:38 -07:00
parent e78f57df66
commit 54a7bbabe8

View file

@ -91,8 +91,16 @@ in
};
};
services.prometheus.scrapeConfigs =
(lib.lists.optional config.services.nginx.enable {
services.prometheus.scrapeConfigs = [
{
job_name = "node";
static_configs = [
{
targets = ["127.0.0.1:9115"];
}
];
}
] ++ (lib.lists.optional config.services.nginx.enable {
job_name = "nginx";
static_configs = [
{
@ -106,6 +114,12 @@ in
listenAddress = "127.0.0.1";
scrapeUri = "http://localhost:80/nginx_status";
};
services.prometheus.exporters.node = {
enable = true;
enabledCollectors = ["systemd"];
port = 9115;
listenAddress = "127.0.0.1";
};
services.nginx.statusPage = lib.mkDefault config.services.nginx.enable;
# sops.secrets."grafana" = {