Ido\Query: Add missing `host` and `service` columns to history queries

fixes #3721
This commit is contained in:
Johannes Meyer 2019-04-16 10:24:33 +02:00
parent 924a580297
commit a8832517bf
4 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,7 @@ class HostflappingstarthistoryQuery extends IdoQuery
protected $columnMap = array( protected $columnMap = array(
'flappinghistory' => array( 'flappinghistory' => array(
'id' => 'hfh.flappinghistory_id', 'id' => 'hfh.flappinghistory_id',
'host' => 'ho.name1 COLLATE latin1_general_ci',
'host_name' => 'ho.name1', 'host_name' => 'ho.name1',
'object_id' => 'hfh.object_id', 'object_id' => 'hfh.object_id',
'object_type' => '(\'host\')', 'object_type' => '(\'host\')',
@ -58,6 +59,7 @@ class HostflappingstarthistoryQuery extends IdoQuery
'servicegroup_alias' => 'sg.alias COLLATE latin1_general_ci' 'servicegroup_alias' => 'sg.alias COLLATE latin1_general_ci'
), ),
'services' => array( 'services' => array(
'service' => 'so.name2 COLLATE latin1_general_ci',
'service_description' => 'so.name2', 'service_description' => 'so.name2',
'service_display_name' => 's.display_name COLLATE latin1_general_ci', 'service_display_name' => 's.display_name COLLATE latin1_general_ci',
'service_host_name' => 'so.name1' 'service_host_name' => 'so.name1'

View File

@ -42,6 +42,7 @@ class HostnotificationQuery extends IdoQuery
'instance_name' => 'i.instance_name' 'instance_name' => 'i.instance_name'
), ),
'notifications' => array( 'notifications' => array(
'host' => 'ho.name1 COLLATE latin1_general_ci',
'host_name' => 'ho.name1', 'host_name' => 'ho.name1',
'notification_output' => 'hn.output', 'notification_output' => 'hn.output',
'notification_reason' => 'hn.notification_reason', 'notification_reason' => 'hn.notification_reason',
@ -53,6 +54,7 @@ class HostnotificationQuery extends IdoQuery
'servicegroup_name' => 'sgo.name1' 'servicegroup_name' => 'sgo.name1'
), ),
'services' => array( 'services' => array(
'service' => 'so.name2 COLLATE latin1_general_ci',
'service_description' => 'so.name2', 'service_description' => 'so.name2',
'service_display_name' => 's.display_name COLLATE latin1_general_ci', 'service_display_name' => 's.display_name COLLATE latin1_general_ci',
'service_host_name' => 'so.name1' 'service_host_name' => 'so.name1'

View File

@ -34,10 +34,12 @@ class ServiceflappingstarthistoryQuery extends IdoQuery
protected $columnMap = array( protected $columnMap = array(
'flappinghistory' => array( 'flappinghistory' => array(
'id' => 'sfh.flappinghistory_id', 'id' => 'sfh.flappinghistory_id',
'host' => 'so.name1 COLLATE latin1_general_ci',
'host_name' => 'so.name1', 'host_name' => 'so.name1',
'object_id' => 'sfh.object_id', 'object_id' => 'sfh.object_id',
'object_type' => '(\'service\')', 'object_type' => '(\'service\')',
'output' => '(sfh.percent_state_change || \'\')', 'output' => '(sfh.percent_state_change || \'\')',
'service' => 'so.name2 COLLATE latin1_general_ci',
'service_description' => 'so.name2', 'service_description' => 'so.name2',
'service_host_name' => 'so.name1', 'service_host_name' => 'so.name1',
'state' => '(-1)', 'state' => '(-1)',

View File

@ -42,12 +42,14 @@ class ServicenotificationQuery extends IdoQuery
'instance_name' => 'i.instance_name' 'instance_name' => 'i.instance_name'
), ),
'notifications' => array( 'notifications' => array(
'host' => 'so.name1 COLLATE latin1_general_ci',
'host_name' => 'so.name1', 'host_name' => 'so.name1',
'notification_output' => 'sn.output', 'notification_output' => 'sn.output',
'notification_reason' => 'sn.notification_reason', 'notification_reason' => 'sn.notification_reason',
'notification_state' => 'sn.state', 'notification_state' => 'sn.state',
'notification_timestamp' => 'UNIX_TIMESTAMP(sn.start_time)', 'notification_timestamp' => 'UNIX_TIMESTAMP(sn.start_time)',
'object_type' => '(\'service\')', 'object_type' => '(\'service\')',
'service' => 'so.name2 COLLATE latin1_general_ci',
'service_description' => 'so.name2', 'service_description' => 'so.name2',
'service_host_name' => 'so.name1' 'service_host_name' => 'so.name1'
), ),