From ff454351cef0718f97d6a9ee2ad64cbc0ded69d4 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 8 Jan 2022 23:00:59 +0100 Subject: vidhar: prometheus: openwrt --- hosts/vidhar/prometheus/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'hosts/vidhar') diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix index d443e991..466be33b 100644 --- a/hosts/vidhar/prometheus/default.nix +++ b/hosts/vidhar/prometheus/default.nix @@ -14,6 +14,11 @@ let regex = "10.141.1.2(:[0-9]+)?"; replacement = "switch01"; } + { source_labels = ["__address__"]; + target_label = "instance"; + regex = "10.141.1.4(:[0-9]+)?"; + replacement = "ap01"; + } ]; in { config = { @@ -189,6 +194,13 @@ in { relabel_configs = relabelHosts; scrape_interval = "1s"; } + { job_name = "openwrt"; + static_configs = [ + { targets = ["localhost:9100"]; } + ]; + relabel_configs = relabelHosts; + scrape_interval = "5s"; + } ]; rules = [ -- cgit v1.2.3