mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: adds prometheus exporter for smokeping to see latency
This commit is contained in:
parent
3aa990e203
commit
550fa87fbc
1 changed files with 18 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ config, ... }:
|
||||
{ config, host, ... }:
|
||||
{
|
||||
services = {
|
||||
prometheus = {
|
||||
|
|
@ -10,6 +10,15 @@
|
|||
enabledCollectors = [ "systemd" ];
|
||||
port = 9002;
|
||||
};
|
||||
smokeping = {
|
||||
enable = true;
|
||||
hosts = [
|
||||
"172.16.10.1"
|
||||
"172.16.10.2"
|
||||
"9.9.9.9"
|
||||
"149.112.112.112"
|
||||
];
|
||||
};
|
||||
};
|
||||
scrapeConfigs = [
|
||||
{
|
||||
|
|
@ -20,6 +29,14 @@
|
|||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "${host} - smokeping";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.smokeping.port}" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue