Freya: Prometheus

This commit is contained in:
Filippo Berto 2024-05-26 21:45:04 +02:00
parent abdc6ef3c4
commit 3474daf269
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED

View file

@ -333,6 +333,28 @@ in
]; ];
}; };
prometheus = {
enable = true;
exporters = {
node = { enable = true; enabledCollectors = [ "systemd" ]; };
systemd.enable = true;
};
globalConfig = {
scrape_interval = "5s";
};
scrapeConfigs = [
{
job_name = "node";
static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }];
}
{
job_name = "systemd";
static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }];
}
];
retentionTime = "15d";
};
snapper.configs = snapper.configs =
let let
common = { TIMELINE_CREATE = true; TIMELINE_CLEANUP = true; }; common = { TIMELINE_CREATE = true; TIMELINE_CLEANUP = true; };