activate NixOS monitoring in prometheus
This commit is contained in:
@@ -12,5 +12,6 @@
|
||||
enable = true;
|
||||
id = "208";
|
||||
pubkey = "s2GT9iYQmuiwkZ04KzSqqlIEbUJ6CT6i4htCjWYt2xs=";
|
||||
nixos = false;
|
||||
};
|
||||
}
|
||||
|
@@ -23,6 +23,13 @@ let
|
||||
"${host.config.networking.hostName}.mon.clerie.de:9100")
|
||||
monitoringHosts;
|
||||
|
||||
nixosMonitoringTargets = mapAttrsToList (name: host:
|
||||
"${host.config.networking.hostName}.mon.clerie.de:9152")
|
||||
(filterAttrs (name: host:
|
||||
# assume this is a NixOS system if not specified
|
||||
attrByPath ["clerie" "monitoring" "nixos"] true host.config)
|
||||
monitoringHosts);
|
||||
|
||||
birdMonitoringTargets = mapAttrsToList (name: host:
|
||||
"${host.config.networking.hostName}.mon.clerie.de:9324")
|
||||
(filterAttrs (name: host:
|
||||
@@ -149,6 +156,15 @@ in {
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "nixos-exporter";
|
||||
scrape_interval = "1m";
|
||||
static_configs = [
|
||||
{
|
||||
targets = nixosMonitoringTargets;
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "bird-exporter";
|
||||
scrape_interval = "20s";
|
||||
|
Reference in New Issue
Block a user