From 3d0980320772d9524219fd4047660f5288cee643 Mon Sep 17 00:00:00 2001 From: "Stark, Jens (Landesbaudirektion)" Date: Mon, 3 Nov 2025 14:11:13 +0100 Subject: [PATCH] escape performanceLabel to fix lookup errors to allow label queries like "D:\_Label:DATA__Serial_Number_62b5b23a" --- histou/grafana/graphpanel/graphpanelvictoriametrics.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/histou/grafana/graphpanel/graphpanelvictoriametrics.php b/histou/grafana/graphpanel/graphpanelvictoriametrics.php index 0bdcbc1..ad94172 100644 --- a/histou/grafana/graphpanel/graphpanelvictoriametrics.php +++ b/histou/grafana/graphpanel/graphpanelvictoriametrics.php @@ -59,6 +59,9 @@ public function genTarget($host, $service, $command, $performanceLabel, $color = if ($alias == '') { $alias = $performanceLabel; } + + $performanceLabel = addslashes($performanceLabel); + if ($useRegex) { $target = $this->createTarget(array( 'host' => array('value' => "^".$host."$", 'operator' => '=~'), @@ -137,6 +140,9 @@ public function genDowntimeTarget($host, $service, $command, $performanceLabel, if ($alias == '') { $alias = 'downtime'; } + + $performanceLabel = addslashes($performanceLabel); + if ($useRegex) { $target = $this->createTarget( array(