/usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Livestatus/Query/DowntimeQuery.php is in icingaweb2-module-monitoring 2.1.0-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <?php
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
namespace Icinga\Module\Monitoring\Backend\Livestatus\Query;
use Icinga\Protocol\Livestatus\Query;
// TODO: still VERRRRY ugly
class DowntimeQuery extends Query
{
protected $table = 'downtimes';
protected $filter_flags = array(
'downtime_is_flexible' => '! fixed',
'downtime_is_in_effect' => 'fixed | ! fixed', // just true
);
protected $available_columns = array(
'downtime_author' => 'author',
'downtime_comment' => 'comment',
'downtime_entry_time' => 'entry_time',
'downtime_is_fixed' => 'fixed',
'downtime_is_flexible' => array('fixed'),
'downtime_triggered_by_id' => 'triggered_by',
'downtime_scheduled_start' => 'start_time', // ??
'downtime_scheduled_end' => 'end_time', // ??
'downtime_start' => 'start_time',
'downtime_end' => 'end_time',
'downtime_duration' => 'duration',
'downtime_is_in_effect' => array('fixed'),
'downtime_internal_id' => 'id',
'downtime_host' => 'host_name', // #7278, #7279
'host' => 'host_name',
'downtime_service' => 'service_description',
'service' => 'service_description', // #7278, #7279
'downtime_objecttype' => array('is_service'),
'downtime_host_state' => 'host_state',
'downtime_service_state' => 'service_state'
);
public function combineResult_downtime_objecttype(& $row, & $res)
{
return $res['is_service'] ? 'service' : 'host';
}
}
|