From 9876a53f8e6c56b475df4c930e95d6c26d5c7b3c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 15 Jun 2015 16:53:13 +0200 Subject: [PATCH] DataView\Eventgrid: Allow to filter for custom variables refs #9009 --- .../library/Monitoring/DataView/Eventgrid.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/monitoring/library/Monitoring/DataView/Eventgrid.php b/modules/monitoring/library/Monitoring/DataView/Eventgrid.php index e95ed5cf8..0dafe7405 100644 --- a/modules/monitoring/library/Monitoring/DataView/Eventgrid.php +++ b/modules/monitoring/library/Monitoring/DataView/Eventgrid.php @@ -5,6 +5,18 @@ namespace Icinga\Module\Monitoring\DataView; class Eventgrid extends DataView { + /** + * {@inheritdoc} + */ + public function isValidFilterTarget($column) + { + if ($column[0] === '_' && preg_match('/^_(?:host|service)_/', $column)) { + return true; + } + + return parent::isValidFilterTarget($column); + } + /** * Retrieve columns provided by this view *