nixos-config/nixos/programs/prometheus.nix
2024-03-04 21:05:00 +05:00

31 lines
613 B
Nix

{ config, ... }: {
services.prometheus = {
enable = true;
port = 55011;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
port = 55012;
};
};
scrapeConfigs = [
{
job_name = "node";
static_configs = [{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
}];
}
{
job_name = "synapse";
metrics_path = "/_synapse/metrics";
static_configs = [{
targets = [ "127.0.0.1:55013" ];
}];
}
];
};
}