add systemd node exporter
This commit is contained in:
parent
e78f57df66
commit
54a7bbabe8
1 changed files with 16 additions and 2 deletions
|
@ -91,8 +91,16 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.prometheus.scrapeConfigs =
|
services.prometheus.scrapeConfigs = [
|
||||||
(lib.lists.optional config.services.nginx.enable {
|
{
|
||||||
|
job_name = "node";
|
||||||
|
static_configs = [
|
||||||
|
{
|
||||||
|
targets = ["127.0.0.1:9115"];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
] ++ (lib.lists.optional config.services.nginx.enable {
|
||||||
job_name = "nginx";
|
job_name = "nginx";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
{
|
{
|
||||||
|
@ -106,6 +114,12 @@ in
|
||||||
listenAddress = "127.0.0.1";
|
listenAddress = "127.0.0.1";
|
||||||
scrapeUri = "http://localhost:80/nginx_status";
|
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;
|
services.nginx.statusPage = lib.mkDefault config.services.nginx.enable;
|
||||||
|
|
||||||
# sops.secrets."grafana" = {
|
# sops.secrets."grafana" = {
|
||||||
|
|
Loading…
Reference in a new issue