diff options
-rw-r--r-- | hosts/vidhar/prometheus/default.nix | 12 |
1 files changed, 12 insertions, 0 deletions
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 | |||
14 | regex = "10.141.1.2(:[0-9]+)?"; | 14 | regex = "10.141.1.2(:[0-9]+)?"; |
15 | replacement = "switch01"; | 15 | replacement = "switch01"; |
16 | } | 16 | } |
17 | { source_labels = ["__address__"]; | ||
18 | target_label = "instance"; | ||
19 | regex = "10.141.1.4(:[0-9]+)?"; | ||
20 | replacement = "ap01"; | ||
21 | } | ||
17 | ]; | 22 | ]; |
18 | in { | 23 | in { |
19 | config = { | 24 | config = { |
@@ -189,6 +194,13 @@ in { | |||
189 | relabel_configs = relabelHosts; | 194 | relabel_configs = relabelHosts; |
190 | scrape_interval = "1s"; | 195 | scrape_interval = "1s"; |
191 | } | 196 | } |
197 | { job_name = "openwrt"; | ||
198 | static_configs = [ | ||
199 | { targets = ["localhost:9100"]; } | ||
200 | ]; | ||
201 | relabel_configs = relabelHosts; | ||
202 | scrape_interval = "5s"; | ||
203 | } | ||
192 | ]; | 204 | ]; |
193 | 205 | ||
194 | rules = [ | 206 | rules = [ |