nixos-config/config/services/prometheus.nix

57 lines
1.5 KiB
Nix
Raw Normal View History

2022-01-15 09:57:49 +00:00
{ config, ... }: {
2022-01-14 20:58:33 +00:00
services.prometheus = {
enable = true;
2022-01-16 20:14:47 +00:00
port = 9002;
2022-01-15 09:57:49 +00:00
scrapeConfigs = [
{
job_name = "node_exporter";
static_configs = [{
targets = [
"${config.services.prometheus.exporters.node.listenAddress}:${toString config.services.prometheus.exporters.node.port}"
];
}];
}
2022-01-15 13:44:34 +00:00
{
job_name = "bind_exporter";
static_configs = [{
targets = [
"${config.services.prometheus.exporters.bind.listenAddress}:${toString config.services.prometheus.exporters.bind.port}"
];
}];
}
2022-01-15 20:50:42 +00:00
{
job_name = "postgres_exporter";
static_configs = [{
targets = [
"${config.services.prometheus.exporters.postgres.listenAddress}:${toString config.services.prometheus.exporters.postgres.port}"
];
}];
}
2022-01-17 13:32:52 +00:00
{
job_name = "gitea_exporter";
static_configs = [{
targets = [
2022-01-17 13:34:22 +00:00
"${config.services.gitea.httpAddress}:${toString config.services.gitea.httpPort}"
2022-01-17 13:32:52 +00:00
];
}];
}
2022-01-17 14:26:01 +00:00
{
job_name = "minio_exporter";
bearer_token_file = "/run/secrets/services/minio_scrape";
metrics_path = "/minio/v0/metrics/cluster";
scheme = "https";
static_configs = [
{
targets = [
"minio.int.chir.rs"
];
}
];
}
2022-01-15 09:57:49 +00:00
];
2022-01-14 20:58:33 +00:00
};
sops.secrets."services/minio_scrape" = {
owner = "prometheus";
};
2022-01-14 20:58:33 +00:00
}