modules: init prometheus
This commit is contained in:
parent
afd1c72cdb
commit
1d21825c7b
2 changed files with 25 additions and 0 deletions
|
@ -8,5 +8,6 @@
|
||||||
./openssh.nix
|
./openssh.nix
|
||||||
./virtualisation.nix
|
./virtualisation.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
|
./prometheus.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
24
modules/prometheus.nix
Normal file
24
modules/prometheus.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
_: {
|
||||||
|
networking.firewall.allowedTCPPorts = [9090];
|
||||||
|
services.prometheus = {
|
||||||
|
enable = true;
|
||||||
|
scrapeConfigs = [
|
||||||
|
{
|
||||||
|
job_name = "prometheus";
|
||||||
|
scrape_interval = "30s";
|
||||||
|
static_configs = [{targets = ["localhost:9090"];}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
job_name = "node";
|
||||||
|
scrape_interval = "30s";
|
||||||
|
static_configs = [{targets = ["localhost:9100"];}];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
exporters = {
|
||||||
|
node = {
|
||||||
|
enable = true;
|
||||||
|
enabledCollectors = ["systemd" "cpu"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue