diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-08 23:00:59 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-01-08 23:00:59 +0100 |
commit | ff454351cef0718f97d6a9ee2ad64cbc0ded69d4 (patch) | |
tree | c3f5f47a5eb875c16102a6dd8192827e84322ee7 /hosts/vidhar/prometheus | |
parent | 5bc987ff56d78201574c03f9bd4d3411d6aa56b9 (diff) | |
download | nixos-ff454351cef0718f97d6a9ee2ad64cbc0ded69d4.tar nixos-ff454351cef0718f97d6a9ee2ad64cbc0ded69d4.tar.gz nixos-ff454351cef0718f97d6a9ee2ad64cbc0ded69d4.tar.bz2 nixos-ff454351cef0718f97d6a9ee2ad64cbc0ded69d4.tar.xz nixos-ff454351cef0718f97d6a9ee2ad64cbc0ded69d4.zip |
vidhar: prometheus: openwrt
Diffstat (limited to 'hosts/vidhar/prometheus')
-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 = [ |