feat: adds prometheus exporter for smokeping to see latency

This commit is contained in:
Ahwx 2025-07-30 14:20:03 +02:00
parent 3aa990e203
commit 550fa87fbc

View file

@ -1,4 +1,4 @@
{ config, ... }: { config, host, ... }:
{ {
services = { services = {
prometheus = { prometheus = {
@ -10,6 +10,15 @@
enabledCollectors = [ "systemd" ]; enabledCollectors = [ "systemd" ];
port = 9002; port = 9002;
}; };
smokeping = {
enable = true;
hosts = [
"172.16.10.1"
"172.16.10.2"
"9.9.9.9"
"149.112.112.112"
];
};
}; };
scrapeConfigs = [ scrapeConfigs = [
{ {
@ -20,6 +29,14 @@
} }
]; ];
} }
{
job_name = "${host} - smokeping";
static_configs = [
{
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.smokeping.port}" ];
}
];
}
]; ];
}; };
}; };