2013-10-14 12:56:06 +02:00
|
|
|
<?php
|
2016-02-08 15:41:00 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013 Icinga Development Team | GPLv2+ */
|
2013-10-14 12:56:06 +02:00
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\DataView;
|
|
|
|
|
|
|
|
class EventHistory extends DataView
|
|
|
|
{
|
2015-06-15 16:53:22 +02:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2013-10-14 12:56:06 +02:00
|
|
|
public function getColumns()
|
|
|
|
{
|
|
|
|
return array(
|
2017-12-06 17:43:42 +01:00
|
|
|
'id',
|
2015-08-25 16:37:58 +02:00
|
|
|
'instance_name',
|
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',
|
2013-10-15 19:56:33 +02:00
|
|
|
'object_type',
|
|
|
|
'timestamp',
|
2013-10-14 12:56:06 +02:00
|
|
|
'state',
|
|
|
|
'output',
|
2015-04-09 14:41:10 +02:00
|
|
|
'type'
|
2013-10-14 12:56:06 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-06-12 12:52:07 +02:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2013-10-14 12:56:06 +02:00
|
|
|
public function getSortRules()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'timestamp' => array(
|
2015-07-28 11:42:55 +02:00
|
|
|
'order' => self::SORT_DESC
|
2013-10-14 12:56:06 +02:00
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-06-12 12:52:07 +02:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2015-08-17 14:04:59 +02:00
|
|
|
public function getStaticFilterColumns()
|
2013-10-14 12:56:06 +02:00
|
|
|
{
|
2015-06-12 12:52:07 +02:00
|
|
|
return array(
|
|
|
|
'host', 'host_alias',
|
|
|
|
'hostgroup', 'hostgroup_alias', 'hostgroup_name',
|
|
|
|
'service',
|
|
|
|
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
|
|
|
|
);
|
2013-10-14 12:56:06 +02:00
|
|
|
}
|
2015-06-25 12:22:56 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function getSearchColumns()
|
|
|
|
{
|
2015-07-31 15:15:13 +02:00
|
|
|
return array('host_display_name', 'service_display_name');
|
2015-06-25 12:22:56 +02:00
|
|
|
}
|
2013-10-14 12:56:06 +02:00
|
|
|
}
|