nixos-config/config/services/prometheus.nix

65 lines
1.9 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-19 19:37:30 +00:00
globalConfig = {
scrape_interval = "10s";
scrape_timeout = "2s";
};
2022-01-15 09:57:49 +00:00
scrapeConfigs = [
{
job_name = "node_exporter";
static_configs = [{
targets = [
2022-01-19 17:52:59 +00:00
"[fd0d:a262:1fa6:e621:b4e1:8ff:e658:6f49]:${toString config.services.prometheus.exporters.node.port}"
"[fd0d:a262:1fa6:e621:47e6:24d4:2acb:9437]:${toString config.services.prometheus.exporters.node.port}"
"[fd0d:a262:1fa6:e621:f45a:db9f:eb7c:1a3f]:${toString config.services.prometheus.exporters.node.port}"
2022-04-24 15:10:00 +00:00
"[fd0d:a262:1fa6:e621:bc9b:6a33:86e4:873b]:${toString config.services.prometheus.exporters.node.port}"
2022-01-15 09:57:49 +00:00
];
}];
}
2022-01-15 13:44:34 +00:00
{
job_name = "bind_exporter";
static_configs = [{
targets = [
2022-01-19 17:52:59 +00:00
"[fd0d:a262:1fa6:e621:b4e1:8ff:e658:6f49]:${toString config.services.prometheus.exporters.bind.port}"
2022-01-15 13:44:34 +00:00
];
}];
}
2022-01-15 20:50:42 +00:00
{
job_name = "postgres_exporter";
static_configs = [{
targets = [
2022-01-19 17:52:59 +00:00
"[fd0d:a262:1fa6:e621:b4e1:8ff:e658:6f49]:${toString config.services.prometheus.exporters.postgres.port}"
2022-01-15 20:50:42 +00:00
];
}];
}
2022-01-17 13:32:52 +00:00
{
job_name = "gitea_exporter";
static_configs = [{
targets = [
2022-01-19 17:52:59 +00:00
"[fd0d:a262:1fa6:e621:b4e1:8ff:e658:6f49]:${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-04-28 17:51:20 +00:00
checkConfig = false;
2022-01-14 20:58:33 +00:00
};
sops.secrets."services/minio_scrape" = {
owner = "prometheus";
};
2022-01-14 20:58:33 +00:00
}