From ad8d7d852ab539a2a82fcedcdab1c83129462a31 Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Tue, 5 Jul 2022 15:35:27 +0000 Subject: [PATCH] ADD rexexp and replacement : not OK --- modules/grafana.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/grafana.nix b/modules/grafana.nix index b57a9f7..c66595e 100644 --- a/modules/grafana.nix +++ b/modules/grafana.nix @@ -25,31 +25,38 @@ static_configs = [{ targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ]; }]; - } - { + } + { job_name = "nextcloud"; static_configs = [{ targets = [ "192.168.10.114:${toString config.services.prometheus.exporters.node.port}" ]; }]; } - { + { job_name = "pizzajoffre"; static_configs = [{ targets = [ "37.187.103.8:${toString config.services.prometheus.exporters.node.port}" ]; }]; } - { + { job_name = "dell-5590"; static_configs = [{ targets = [ "192.168.10.100:${toString config.services.prometheus.exporters.node.port}" ]; }]; } - { + { job_name = "temperatures"; static_configs = [{ targets = [ "192.168.10.116:9521" ]; }]; + relabel_configs = [{ + source_labels = [ "device" ]; + target_label = "id"; + regex = "c9:5e:c5:16:23:4d" ; + replacement = "A"; + }]; } + ]; }; users.users.caddy = {