From 3e5921b96b17ea4d0a5f32a39940a9b762e5c3a4 Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Tue, 12 Apr 2016 03:14:16 +0000 Subject: [PATCH] remove quotes around $service variable This fixes https://dev.icinga.org/issues/11572 This still leaves $hostname being quoted, I don't know if that needs to go as well. --- application/controllers/ShowController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/controllers/ShowController.php b/application/controllers/ShowController.php index f029b81..0457ce9 100644 --- a/application/controllers/ShowController.php +++ b/application/controllers/ShowController.php @@ -168,7 +168,7 @@ public function hostAction() if (! array_key_exists('icingaHost', $patterns)) continue; foreach ($set->loadTemplates() as $key => $template) { - if (strpos($template->getFilterString(), '$service') !== false) continue; + if (strpos($template->getFilterString(), $service) !== false) continue; $imgParams = array( 'template' => $key, @@ -228,7 +228,7 @@ public function serviceAction() if (! array_key_exists('icingaHost', $patterns)) continue; foreach ($set->loadTemplates() as $key => $template) { - if (strpos($template->getFilterString(), '$service') === false) continue; + if (strpos($template->getFilterString(), $service) === false) continue; $imgParams = array( 'template' => $key, @@ -289,7 +289,7 @@ public function XXXserviceAction() foreach ($set->loadTemplates() as $key => $template) { - if (strpos($template->getFilterString(), '$service') === false) continue; + if (strpos($template->getFilterString(), $service) === false) continue; $this->view->templates[$key] = $template; diff -Naur a/library/Graphite/ProvidedHook/Monitoring/ServiceActions.php b/library/Graphite/ProvidedHook/Monitoring/ServiceActions.php --- a/library/Graphite/ProvidedHook/Monitoring/ServiceActions.php 2016-10-16 19:10:49.794640399 -0500 +++ b/library/Graphite/ProvidedHook/Monitoring/ServiceActions.php 2016-10-16 19:11:17.136401235 -0500 @@ -16,6 +16,7 @@ array( 'host' => $service->host_name, 'service' => $service->service_description, + 'check_command' => $service->service_check_command, )) ); }