nixos-config/machines/saga/prometheus/default.nix

37 lines
784 B
Nix

{ config, ... }:
{
services.prometheus = {
enable = true;
scrapeConfigs = [
{
job_name = "saga";
static_configs = [
{
targets = [
"saga:${toString config.services.prometheus.exporters.node.port}" # node
];
}
];
}
{
job_name = "valkyrie";
static_configs = [
{
targets = [
"valkyrie:${toString config.services.prometheus.exporters.node.port}" # node
"valkyrie:${toString config.services.prometheus.exporters.unbound.port}" # unbound
];
}
];
}
];
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
};
};
};
}