monitoring/statehistorysummary: filter fixes

Slightly adjusted filter string to fit new filters, fixed an issue
with 'object_type' column in virtual eventhistory table.
This commit is contained in:
Thomas Gelf 2014-06-21 03:18:00 +02:00
parent b3cdeee35d
commit 7b5d7bdbcf
8 changed files with 15 additions and 8 deletions

View File

@ -22,7 +22,7 @@ foreach ($summary as $entry) {
'timestamp>' => strtotime($day . ' 00:00:00'),
'object_type' => 'service',
'state' => '2',
'type' => 'hard_state,soft_state'
'type' => '(hard_state|soft_state)'
)
)
);

View File

@ -22,7 +22,8 @@ class CommentdeletionhistoryQuery extends IdoQuery
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci'
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -22,7 +22,8 @@ class CommenthistoryQuery extends IdoQuery
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci'
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -22,7 +22,8 @@ class DowntimeendhistoryQuery extends IdoQuery
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci'
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -22,7 +22,8 @@ class DowntimestarthistoryQuery extends IdoQuery
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci'
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -20,7 +20,7 @@ class EventHistoryQuery extends IdoQuery
'service' => 'eho.name2 COLLATE latin1_general_ci',
'host_name' => 'eho.name1 COLLATE latin1_general_ci',
'service_description' => 'eho.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN eho.objecttype_id = 1 THEN 'host' ELSE 'service' END",
'object_type' => 'eh.object_type',
'timestamp' => 'eh.timestamp',
'state' => 'eh.state',
'attempt' => 'eh.attempt',
@ -46,6 +46,7 @@ class EventHistoryQuery extends IdoQuery
'output',
'state',
'state_type',
'object_type',
'attempt',
'max_attempts',
);

View File

@ -22,7 +22,8 @@ class NotificationhistoryQuery extends IdoQuery
'host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'service_host_name' => 'o.name1 COLLATE latin1_general_ci',
'service_description' => 'o.name2 COLLATE latin1_general_ci'
'service_description' => 'o.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN o.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);

View File

@ -22,7 +22,8 @@ class StatehistoryQuery extends IdoQuery
'host_name' => 'sho.name1 COLLATE latin1_general_ci',
'service_description' => 'sho.name2 COLLATE latin1_general_ci',
'service_host_name' => 'sho.name1 COLLATE latin1_general_ci',
'service_description' => 'sho.name2 COLLATE latin1_general_ci'
'service_description' => 'sho.name2 COLLATE latin1_general_ci',
'object_type' => "CASE WHEN sho.objecttype_id = 1 THEN 'host' ELSE 'service' END"
)
);