StatehistoryQuery, initial commit

This commit is contained in:
Thomas Gelf 2013-08-20 23:03:06 +02:00 committed by Eric Lippmann
parent 07badc377e
commit fbdfa7a59e

View File

@ -0,0 +1,22 @@
<?php
namespace Icinga\Monitoring\Backend\Ido\Query;
class StatehistoryQuery extends AbstractQuery
{
protected $columnMap = array(
'statehistory' => array(
'raw_timestamp' => 'state_time',
'timestamp' => 'UNIX_TIMESTAMP(state_time)',
'state_time' => 'state_time',
'object_id' => 'object_id',
'type' => "(CASE WHEN state_type = 1 THEN 'hard_state' ELSE 'soft_state' END)",
'state' => 'state',
'state_type' => 'state_type',
'output' => 'output',
'attempt' => 'current_check_attempt',
'max_attempts' => 'max_check_attempts',
)
);
}