From e275c46fbd07fe3797fafa8f888c56e94b1dabe7 Mon Sep 17 00:00:00 2001 From: Yovko Yovkov <10108317+yyovkov@users.noreply.github.com> Date: Sun, 9 Oct 2022 16:13:56 +0300 Subject: [PATCH] better ifname regexp Before regexp for isolating interface names was relying on the the next tag in query to be exactly "instance", which were generating few issues: - if there is another tag starting with the word "interface" - if the next tag is not "interface" then the interface name extracted are not valid. The proposed regexp is solving that issues --- grafana/provisioning/dashboards/Mikrotik-snmp-prometheus.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grafana/provisioning/dashboards/Mikrotik-snmp-prometheus.json b/grafana/provisioning/dashboards/Mikrotik-snmp-prometheus.json index fe51424..be89a44 100644 --- a/grafana/provisioning/dashboards/Mikrotik-snmp-prometheus.json +++ b/grafana/provisioning/dashboards/Mikrotik-snmp-prometheus.json @@ -8636,7 +8636,7 @@ "refId": "Prometheus-Interface-Variable-Query" }, "refresh": 1, - "regex": "/ifName=\"(.*)\",instance/", + "regex": "/ifName=\"(.*?)\"/", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", @@ -8813,4 +8813,4 @@ "uid": "nR3NRDGaz", "version": 1, "weekStart": "" -} \ No newline at end of file +}