nixos-config/nixos/programs/prometheus.nix

31 lines
613 B
Nix
Raw Normal View History

2024-03-04 20:34:12 +05:00
{ 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}" ];
}];
}
2024-03-04 20:52:33 +05:00
{
job_name = "synapse";
metrics_path = "/_synapse/metrics";
static_configs = [{
targets = [ "127.0.0.1:55013" ];
}];
}
2024-03-04 20:34:12 +05:00
];
};
}