From 7cbcb91fd7b89a2c3496d482d97187a3dad78fb2 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 15 Jun 2015 16:53:22 +0200 Subject: [PATCH] DataView\Eventhistory: Allow to filter for custom variables refs #9009 --- .../library/Monitoring/DataView/Eventhistory.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/monitoring/library/Monitoring/DataView/Eventhistory.php b/modules/monitoring/library/Monitoring/DataView/Eventhistory.php index b826b535c..223e1d7d1 100644 --- a/modules/monitoring/library/Monitoring/DataView/Eventhistory.php +++ b/modules/monitoring/library/Monitoring/DataView/Eventhistory.php @@ -5,6 +5,18 @@ namespace Icinga\Module\Monitoring\DataView; class EventHistory 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 *