From 7f60015aa01cc2493932a9e0a8bad0890c80a507 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Wed, 5 Apr 2023 19:02:51 -0700 Subject: modules/prometheus: fix IP addresses --- modules/services/prometheus/default.nix | 36 +++++++-------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) (limited to 'modules/services/prometheus/default.nix') diff --git a/modules/services/prometheus/default.nix b/modules/services/prometheus/default.nix index b0cb7ca..a61f238 100644 --- a/modules/services/prometheus/default.nix +++ b/modules/services/prometheus/default.nix @@ -27,14 +27,7 @@ let { source_labels = [ "__address__" ]; target_label = "instance"; - replacement = "nas"; - action = "replace"; - regex = "192.168.6.10:(.*)"; - } - { - source_labels = [ "__address__" ]; - target_label = "instance"; - replacement = "rtr"; + replacement = "carmel"; action = "replace"; regex = "192.168.6.1:(.*)"; } @@ -43,7 +36,7 @@ let target_label = "instance"; replacement = "tahoe"; action = "replace"; - regex = "192.168.6.20:(.*)"; + regex = "192.168.6.40:(.*)"; } ]; in @@ -124,37 +117,22 @@ in { job_name = "node"; static_configs = - [{ targets = [ "192.168.6.1:9100" "192.168.6.20:9100" ]; }]; + [{ targets = [ "192.168.6.1:9100" "192.168.6.40:9100" ]; }]; relabel_configs = relabelConfigs; } { job_name = "prometheus"; - static_configs = [{ targets = [ "192.168.6.20:9090" ]; }]; - relabel_configs = relabelConfigs; - } - { - job_name = "dnsd"; - static_configs = [{ targets = [ "192.168.6.1:8053" ]; }]; - relabel_configs = relabelConfigs; - } - { - job_name = "dnsdd"; - static_configs = [{ targets = [ "192.168.6.1:9060" ]; }]; - relabel_configs = relabelConfigs; - } - { - job_name = "dhcpd"; - static_configs = [{ targets = [ "192.168.6.1:8067" ]; }]; + static_configs = [{ targets = [ "192.168.6.40:9090" ]; }]; relabel_configs = relabelConfigs; } { - job_name = "netd"; - static_configs = [{ targets = [ "192.168.6.1:8055" ]; }]; + job_name = "dnsmasq"; + static_configs = [{ targets = [ "192.168.6.1:9153" ]; }]; relabel_configs = relabelConfigs; } { job_name = "unifi-poller"; - static_configs = [{ targets = [ "192.168.6.20:9130" ]; }]; + static_configs = [{ targets = [ "192.168.6.40:9130" ]; }]; relabel_configs = relabelConfigs; } ]; -- cgit 1.4.1