Show check attempts only for soft state changes

refs #2718
This commit is contained in:
Alexander A. Klimov 2017-02-08 14:09:18 +01:00
parent 80d3abed9d
commit 95020bfed4
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ class HoststatehistoryQuery extends IdoQuery
'host_name' => 'ho.name1',
'object_id' => 'hh.object_id',
'object_type' => '(\'host\')',
'output' => "('[ ' || hh.current_check_attempt || '/' || hh.max_check_attempts || ' ] ' || hh.output)",
'output' => '(CASE WHEN hh.state_type = 1 THEN hh.output ELSE \'[ \' || hh.current_check_attempt || \'/\' || hh.max_check_attempts || \' ] \' || hh.output END)',
'state' => 'hh.state',
'timestamp' => 'UNIX_TIMESTAMP(hh.state_time)',
'type' => "(CASE WHEN hh.state_type = 1 THEN 'hard_state' ELSE 'soft_state' END)"

View File

@ -62,7 +62,7 @@ class ServicestatehistoryQuery extends IdoQuery
'host_name' => 'so.name1',
'object_id' => 'sh.object_id',
'object_type' => '(\'service\')',
'output' => "('[ ' || sh.current_check_attempt || '/' || sh.max_check_attempts || ' ] ' || sh.output)",
'output' => '(CASE WHEN sh.state_type = 1 THEN sh.output ELSE \'[ \' || sh.current_check_attempt || \'/\' || sh.max_check_attempts || \' ] \' || sh.output END)',
'service' => 'so.name2 COLLATE latin1_general_ci',
'service_description' => 'so.name2',
'service_host' => 'so.name1 COLLATE latin1_general_ci',