diff --git a/modules/grafana.nix b/modules/grafana.nix index c66595e..e8000b8 100644 --- a/modules/grafana.nix +++ b/modules/grafana.nix @@ -49,12 +49,68 @@ static_configs = [{ targets = [ "192.168.10.116:9521" ]; }]; - relabel_configs = [{ + metric_relabel_configs = [ + { source_labels = [ "device" ]; - target_label = "id"; + target_label = "device"; regex = "c9:5e:c5:16:23:4d" ; - replacement = "A"; - }]; + replacement = "I"; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "e4:9b:e7:3f:b1:24" ; + replacement = "J Perso"; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "ff:a4:06:f3:18:5E" ; + replacement = "H - réserve "; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "f5:fd:dd:c4:29:c1" ; + replacement = "G - gris"; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "fd:7c:46:30:5b:18" ; + replacement = "F"; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "e7:ef:27:89:c4:05" ; + replacement = "A CODIGEL"; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "d4:1e:62:36:d0:4b" ; + replacement = "B - INFRICO"; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "ec:c3:0f:ef:fe:b5" ; + replacement = "C"; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "f5:fd:dd:c4:29:c1" ; + replacement = "D - HAIER"; + } + { + source_labels = [ "device" ]; + target_label = "device"; + regex = "c8:8e:34:24:2c:89" ; + replacement = "F - salle"; + } + ]; } ];