mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
31 lines
609 B
Nix
31 lines
609 B
Nix
{ config, ... }:
|
|
{
|
|
services = {
|
|
prometheus = {
|
|
enable = true;
|
|
port = 9001;
|
|
exporters = {
|
|
node = {
|
|
enable = true;
|
|
enabledCollectors = [ "systemd" ];
|
|
port = 9002;
|
|
};
|
|
};
|
|
scrapeConfigs = [
|
|
{
|
|
job_name = "${config.networking.hostName}";
|
|
static_configs = [
|
|
{
|
|
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
|
|
}
|
|
];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
# networking.firewall = {
|
|
# allowedTCPPorts = [
|
|
# 9001
|
|
# ];
|
|
# };
|
|
}
|