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(