summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-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__";