From 3530f6af34154f3cfd8cb55b59ee5104cc75d577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 15 Sep 2024 15:20:48 +0300 Subject: [PATCH] ping exporter: import to prometheus --- hosts/fwminex/configuration.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/fwminex/configuration.nix b/hosts/fwminex/configuration.nix index e072e0f..8c31014 100644 --- a/hosts/fwminex/configuration.nix +++ b/hosts/fwminex/configuration.nix @@ -345,8 +345,14 @@ in exporters.ping = { enable = true; settings = { + ping = { + interval = "10s"; + timeout = "5s"; + history-size = 6; + }; targets = [ "1.1.1.1" + "8.8.4.4" "fra1-b.jakstys.lt" myData.hosts."fra1-b.servers.jakst".jakstIP @@ -359,6 +365,12 @@ in port = builtins.toString myData.ports.exporters.node; in [ + { + job_name = "ping"; + static_configs = [ + { targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.ping.port}" ]; } + ]; + } { job_name = "prometheus"; static_configs = [ { targets = [ "127.0.0.1:${toString myData.ports.prometheus}" ]; } ];