summaryrefslogtreecommitdiff
path: root/hosts/vidhar/prometheus
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-04-08 18:32:09 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-04-08 18:32:09 +0200
commit9d1bafb43326110f49b68ecbb4b2d0e89190996c (patch)
treeaf7d49dbd699881e208730e3e43802440d8979ac /hosts/vidhar/prometheus
parent93a171a23f8c146eda6ccca13bde41eec87ef913 (diff)
downloadnixos-9d1bafb43326110f49b68ecbb4b2d0e89190996c.tar
nixos-9d1bafb43326110f49b68ecbb4b2d0e89190996c.tar.gz
nixos-9d1bafb43326110f49b68ecbb4b2d0e89190996c.tar.bz2
nixos-9d1bafb43326110f49b68ecbb4b2d0e89190996c.tar.xz
nixos-9d1bafb43326110f49b68ecbb4b2d0e89190996c.zip
vidhar: ...
Diffstat (limited to 'hosts/vidhar/prometheus')
-rw-r--r--hosts/vidhar/prometheus/default.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/hosts/vidhar/prometheus/default.nix b/hosts/vidhar/prometheus/default.nix
index 3f3c285b..1aa0c0b4 100644
--- a/hosts/vidhar/prometheus/default.nix
+++ b/hosts/vidhar/prometheus/default.nix
@@ -6,7 +6,7 @@ let
6 relabelHosts = [ 6 relabelHosts = [
7 { source_labels = ["__address__"]; 7 { source_labels = ["__address__"];
8 target_label = "instance"; 8 target_label = "instance";
9 regex = "localhost(:[0-9]+)?"; 9 regex = "(localhost|127\.[0-9]+\.[0-9]+\.[0-9]+)(:[0-9]+)?";
10 replacement = "vidhar"; 10 replacement = "vidhar";
11 } 11 }
12 { source_labels = ["__address__"]; 12 { source_labels = ["__address__"];
@@ -225,15 +225,16 @@ in {
225 { source_labels = ["__address__"]; 225 { source_labels = ["__address__"];
226 target_label = "__param_target"; 226 target_label = "__param_target";
227 } 227 }
228 { source_labels = ["__param_target"]; 228 ] ++ relabelHosts ++
229 [ { source_labels = ["__param_target"];
229 target_label = "instance"; 230 target_label = "instance";
230 regex = "127\.0\.0\.53:53"; 231 regex = "127\.0\.0\.53:53";
231 replacement = "systemd-resolved.vidhar"; 232 replacement = "systemd-resolved.dns_soa";
232 } 233 }
233 { source_labels = ["__param_target"]; 234 { source_labels = ["__param_target"];
234 target_label = "instance"; 235 target_label = "instance";
235 regex = "127\.0\.0\.1:53"; 236 regex = "127\.0\.0\.1:53";
236 replacement = "unbound.vidhar"; 237 replacement = "unbound.dns_soa";
237 } 238 }
238 { replacement = "localhost:${toString config.services.prometheus.exporters.blackbox.port}"; 239 { replacement = "localhost:${toString config.services.prometheus.exporters.blackbox.port}";
239 target_label = "__address__"; 240 target_label = "__address__";