2024-07-19 20:13:30 +02:00
|
|
|
{ config, ... }:
|
|
|
|
{
|
|
|
|
|
|
|
|
services.prometheus = {
|
|
|
|
enable = true;
|
2024-07-22 10:49:23 +02:00
|
|
|
exporters = {
|
|
|
|
node = {
|
|
|
|
enable = true;
|
2024-08-12 15:56:45 +02:00
|
|
|
enabledCollectors = [
|
|
|
|
"logind"
|
|
|
|
"systemd"
|
|
|
|
];
|
2024-07-22 10:49:23 +02:00
|
|
|
port = 9002;
|
|
|
|
};
|
2024-07-19 20:13:30 +02:00
|
|
|
};
|
2024-07-22 10:49:23 +02:00
|
|
|
scrapeConfigs = [
|
|
|
|
{
|
|
|
|
job_name = "synapse";
|
|
|
|
scrape_interval = "15s";
|
|
|
|
metrics_path = "/_synapse/metrics";
|
2024-07-22 11:27:52 +02:00
|
|
|
static_configs = [ { targets = [ "localhost:9000" ]; } ];
|
2024-07-22 11:05:06 +02:00
|
|
|
}
|
|
|
|
{
|
|
|
|
job_name = "homelab-stats";
|
|
|
|
static_configs = [
|
|
|
|
{ targets = [ "localhost:${builtins.toString config.services.prometheus.exporters.node.port}" ]; }
|
|
|
|
];
|
2024-07-22 10:49:23 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2024-07-19 20:13:30 +02:00
|
|
|
};
|
|
|
|
}
|