2015-05-19 17:31:17 +02:00
|
|
|
<?php
|
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
|
|
|
|
|
|
|
namespace Icinga\Module\Monitoring\DataView;
|
|
|
|
|
2015-05-20 15:40:49 +02:00
|
|
|
/**
|
|
|
|
* Data view for the host group summary
|
|
|
|
*/
|
|
|
|
class Hostgroupsummary extends DataView
|
2015-05-19 17:31:17 +02:00
|
|
|
{
|
2015-05-20 15:40:49 +02:00
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function getColumns()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'hostgroup_alias',
|
|
|
|
'hostgroup_name',
|
|
|
|
'hosts_down_handled',
|
2015-06-03 11:49:21 +02:00
|
|
|
'hosts_down_handled_last_state_change',
|
2015-05-20 15:40:49 +02:00
|
|
|
'hosts_down_unhandled',
|
2015-06-03 11:49:21 +02:00
|
|
|
'hosts_down_unhandled_last_state_change',
|
2015-05-20 15:40:49 +02:00
|
|
|
'hosts_pending',
|
|
|
|
'hosts_pending_last_state_change',
|
2015-05-20 17:03:23 +02:00
|
|
|
'hosts_total',
|
2015-05-20 15:40:49 +02:00
|
|
|
'hosts_unreachable_handled',
|
2015-06-03 11:49:21 +02:00
|
|
|
'hosts_unreachable_handled_last_state_change',
|
2015-05-20 15:40:49 +02:00
|
|
|
'hosts_unreachable_unhandled',
|
2015-06-03 11:49:21 +02:00
|
|
|
'hosts_unreachable_unhandled_last_state_change',
|
2015-05-20 15:40:49 +02:00
|
|
|
'hosts_up',
|
|
|
|
'hosts_up_last_state_change',
|
|
|
|
'services_critical_handled',
|
|
|
|
'services_critical_unhandled',
|
|
|
|
'services_ok',
|
|
|
|
'services_pending',
|
|
|
|
'services_total',
|
|
|
|
'services_unknown_handled',
|
|
|
|
'services_unknown_unhandled',
|
|
|
|
'services_warning_handled',
|
|
|
|
'services_warning_unhandled'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2015-08-17 14:05:37 +02:00
|
|
|
public function getStaticFilterColumns()
|
2015-05-19 17:31:17 +02:00
|
|
|
{
|
2015-06-03 11:49:21 +02:00
|
|
|
return array(
|
2015-08-25 16:38:23 +02:00
|
|
|
'instance_name',
|
2015-06-03 11:49:21 +02:00
|
|
|
'hosts_severity',
|
2015-06-05 09:14:26 +02:00
|
|
|
'host', 'host_alias', 'host_display_name', 'host_name',
|
|
|
|
'hostgroup',
|
2015-06-05 15:48:58 +02:00
|
|
|
'service', 'service_description', 'service_display_name',
|
2015-06-05 09:14:26 +02:00
|
|
|
'servicegroup', 'servicegroup_alias', 'servicegroup_name'
|
2015-06-03 11:49:21 +02:00
|
|
|
);
|
2015-05-19 17:31:17 +02:00
|
|
|
}
|
2015-05-19 17:50:07 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
2015-05-20 15:37:24 +02:00
|
|
|
*/
|
2015-05-21 11:24:31 +02:00
|
|
|
public function getSearchColumns()
|
2015-05-20 15:37:24 +02:00
|
|
|
{
|
2015-07-31 15:15:13 +02:00
|
|
|
return array('hostgroup_alias');
|
2015-05-20 15:37:24 +02:00
|
|
|
}
|
2015-05-21 12:26:27 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function getSortRules()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'hostgroup_alias' => array(
|
|
|
|
'order' => self::SORT_ASC
|
|
|
|
),
|
|
|
|
'hosts_severity' => array(
|
|
|
|
'columns' => array(
|
|
|
|
'hosts_severity',
|
|
|
|
'hostgroup_alias ASC'
|
|
|
|
),
|
|
|
|
'order' => self::SORT_DESC
|
|
|
|
),
|
|
|
|
'hosts_total' => array(
|
|
|
|
'columns' => array(
|
|
|
|
'hosts_total',
|
|
|
|
'hostgroup_alias ASC'
|
|
|
|
),
|
|
|
|
'order' => self::SORT_ASC
|
2015-05-21 12:37:53 +02:00
|
|
|
),
|
|
|
|
'services_total' => array(
|
|
|
|
'columns' => array(
|
|
|
|
'services_total',
|
|
|
|
'hostgroup_alias ASC'
|
|
|
|
),
|
|
|
|
'order' => self::SORT_ASC
|
2015-05-21 12:26:27 +02:00
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
2015-05-19 17:31:17 +02:00
|
|
|
}
|