2013-10-14 12:56:06 +02:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2013-10-14 12:56:06 +02:00
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\DataView;
|
|
|
|
|
|
|
|
class EventHistory extends DataView
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Retrieve columns provided by this view
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getColumns()
|
|
|
|
{
|
|
|
|
return array(
|
2013-10-15 19:56:33 +02:00
|
|
|
'cnt_notification',
|
|
|
|
'cnt_hard_state',
|
|
|
|
'cnt_soft_state',
|
|
|
|
'cnt_downtime_start',
|
|
|
|
'cnt_downtime_end',
|
2013-10-14 12:56:06 +02:00
|
|
|
'host_name',
|
2015-01-21 10:28:21 +01:00
|
|
|
'host_display_name',
|
2013-10-15 19:56:33 +02:00
|
|
|
'service_description',
|
2015-01-21 10:28:21 +01:00
|
|
|
'service_display_name',
|
2015-04-09 14:44:10 +02:00
|
|
|
'hostgroup_name',
|
2013-10-15 19:56:33 +02:00
|
|
|
'object_type',
|
|
|
|
'timestamp',
|
2013-10-14 12:56:06 +02:00
|
|
|
'state',
|
|
|
|
'attempt',
|
|
|
|
'max_attempts',
|
|
|
|
'output',
|
2015-04-09 14:41:10 +02:00
|
|
|
'type'
|
2013-10-14 12:56:06 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSortRules()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'timestamp' => array(
|
2015-01-21 10:28:21 +01:00
|
|
|
'columns' => array('timestamp'),
|
|
|
|
'order' => 'DESC'
|
2013-10-14 12:56:06 +02:00
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getFilterColumns()
|
|
|
|
{
|
2015-04-09 14:41:10 +02:00
|
|
|
return array('host', 'service', 'hostgroup');
|
2013-10-14 12:56:06 +02:00
|
|
|
}
|
|
|
|
}
|