nixos-config/config/services/prometheus.nix

142 lines
3.1 KiB
Nix
Raw Normal View History

2022-06-12 15:39:15 +00:00
{config, ...}: {
2022-01-14 20:58:33 +00:00
services.prometheus = {
2023-12-10 09:36:28 +00:00
port = 26678;
2022-01-14 20:58:33 +00:00
enable = true;
2023-12-10 09:36:28 +00:00
retentionTime = "90d";
2023-12-15 11:32:41 +00:00
checkConfig = false;
2023-12-10 09:36:28 +00:00
# ingest the published nodes
2022-01-15 09:57:49 +00:00
scrapeConfigs = [
{
2023-12-10 09:36:28 +00:00
job_name = "nodes";
2022-06-12 15:39:15 +00:00
static_configs = [
{
targets = [
2023-12-10 20:27:33 +00:00
"nas.int.chir.rs:31941"
"nixos-8gb-fsn1-1.int.chir.rs:31941"
"instance-20221213-1915.int.chir.rs:31941"
"rainbow-resort.int.chir.rs:31941"
"thinkrac.int.chir.rs:31941"
];
}
];
}
{
job_name = "dovecot";
static_configs = [
{
targets = [
"nixos-8gb-fsn1-1.int.chir.rs:35496"
];
}
];
}
{
job_name = "forgejo";
static_configs = [
{
targets = [
"nixos-8gb-fsn1-1.int.chir.rs:6379"
];
}
];
}
{
job_name = "hydra";
static_configs = [
{
targets = [
"nas.int.chir.rs:8905"
];
}
];
}
{
job_name = "matrix-media-repo";
static_configs = [
{
targets = [
"nixos-8gb-fsn1-1.int.chir.rs:20855"
];
}
];
}
{
job_name = "rspamd";
static_configs = [
{
targets = [
"nixos-8gb-fsn1-1.int.chir.rs:58636"
];
}
];
}
{
job_name = "matrix-synapse";
metrics_path = "/_synapse/metrics";
static_configs = [
{
targets = [
"instance-20221213-1915.int.chir.rs:8008"
];
}
];
}
{
job_name = "opentelemetry-collector";
static_configs = [
{
targets = [
"nas.int.chir.rs:63174"
"nixos-8gb-fsn1-1.int.chir.rs:63174"
"instance-20221213-1915.int.chir.rs:63174"
"rainbow-resort.int.chir.rs:63174"
"thinkrac.int.chir.rs:63174"
2022-06-12 15:39:15 +00:00
];
}
];
2022-01-15 09:57:49 +00:00
}
2023-12-11 08:36:38 +00:00
{
job_name = "postgresql";
static_configs = [
{
targets = [
"nas.int.chir.rs:1589"
"nixos-8gb-fsn1-1.int.chir.rs:1589"
"instance-20221213-1915.int.chir.rs:1589"
"thinkrac.int.chir.rs:1589"
"rainbow-resort.int.chir.rs:1589"
];
}
];
}
2023-12-11 08:49:23 +00:00
{
job_name = "akkoma";
metrics_path = "/api/v1/akkoma/metrics";
2023-12-13 09:32:11 +00:00
authorization.credentials_file = config.sops.secrets."services/akkoma-key".path;
2023-12-11 08:49:23 +00:00
scheme = "https";
static_configs = [
{
targets = [
"akko.chir.rs"
];
}
2023-12-11 08:54:06 +00:00
];
}
{
job_name = "matrix-sliding-sync";
static_configs = [
{
targets = [
"instance-20221213-1915.int.chir.rs:50372"
];
}
];
2023-12-11 08:49:23 +00:00
}
2022-01-15 09:57:49 +00:00
];
2022-01-14 20:58:33 +00:00
};
sops.secrets."services/akkoma-key".owner = "prometheus";
2022-01-14 20:58:33 +00:00
}