mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-20 04:14:24 +02:00
Merge branch 'feature/monitoring-indicate-late-check-results-8378'
resolves #8378
This commit is contained in:
commit
e9a3b0fb99
@ -540,6 +540,12 @@
|
||||
"code": 59414,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "130380e481a7defc690dfb24123a1f0c",
|
||||
"css": "circle",
|
||||
"code": 59516,
|
||||
"src": "fontawesome"
|
||||
},
|
||||
{
|
||||
"uid": "266d5d9adf15a61800477a5acf9a4462",
|
||||
"css": "chart-bar",
|
||||
|
@ -120,4 +120,5 @@
|
||||
.icon-left-small:before { content: '\e876'; } /* '' */
|
||||
.icon-right-small:before { content: '\e877'; } /* '' */
|
||||
.icon-up-small:before { content: '\e878'; } /* '' */
|
||||
.icon-pin:before { content: '\e879'; } /* '' */
|
||||
.icon-pin:before { content: '\e879'; } /* '' */
|
||||
.icon-circle:before { content: '\e87c'; } /* '' */
|
File diff suppressed because one or more lines are too long
@ -120,4 +120,5 @@
|
||||
.icon-left-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-up-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-pin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-pin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-circle { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
@ -131,4 +131,5 @@
|
||||
.icon-left-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-right-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-up-small { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-pin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-pin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
||||
.icon-circle { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
|
15
application/fonts/fontello-ifont/css/ifont.css
vendored
15
application/fonts/fontello-ifont/css/ifont.css
vendored
@ -1,10 +1,10 @@
|
||||
@font-face {
|
||||
font-family: 'ifont';
|
||||
src: url('../font/ifont.eot?612849');
|
||||
src: url('../font/ifont.eot?612849#iefix') format('embedded-opentype'),
|
||||
url('../font/ifont.woff?612849') format('woff'),
|
||||
url('../font/ifont.ttf?612849') format('truetype'),
|
||||
url('../font/ifont.svg?612849#ifont') format('svg');
|
||||
src: url('../font/ifont.eot?82929165');
|
||||
src: url('../font/ifont.eot?82929165#iefix') format('embedded-opentype'),
|
||||
url('../font/ifont.woff?82929165') format('woff'),
|
||||
url('../font/ifont.ttf?82929165') format('truetype'),
|
||||
url('../font/ifont.svg?82929165#ifont') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@ -14,7 +14,7 @@
|
||||
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||
@font-face {
|
||||
font-family: 'ifont';
|
||||
src: url('../font/ifont.svg?612849#ifont') format('svg');
|
||||
src: url('../font/ifont.svg?82929165#ifont') format('svg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
@ -175,4 +175,5 @@
|
||||
.icon-left-small:before { content: '\e876'; } /* '' */
|
||||
.icon-right-small:before { content: '\e877'; } /* '' */
|
||||
.icon-up-small:before { content: '\e878'; } /* '' */
|
||||
.icon-pin:before { content: '\e879'; } /* '' */
|
||||
.icon-pin:before { content: '\e879'; } /* '' */
|
||||
.icon-circle:before { content: '\e87c'; } /* '' */
|
@ -229,11 +229,11 @@ body {
|
||||
}
|
||||
@font-face {
|
||||
font-family: 'ifont';
|
||||
src: url('./font/ifont.eot?91269362');
|
||||
src: url('./font/ifont.eot?91269362#iefix') format('embedded-opentype'),
|
||||
url('./font/ifont.woff?91269362') format('woff'),
|
||||
url('./font/ifont.ttf?91269362') format('truetype'),
|
||||
url('./font/ifont.svg?91269362#ifont') format('svg');
|
||||
src: url('./font/ifont.eot?83291894');
|
||||
src: url('./font/ifont.eot?83291894#iefix') format('embedded-opentype'),
|
||||
url('./font/ifont.woff?83291894') format('woff'),
|
||||
url('./font/ifont.ttf?83291894') format('truetype'),
|
||||
url('./font/ifont.svg?83291894#ifont') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
@ -483,6 +483,7 @@ body {
|
||||
<div class="row">
|
||||
<div title="Code: 0xe878" class="the-icons span3"><i class="demo-icon icon-up-small"></i> <span class="i-name">icon-up-small</span><span class="i-code">0xe878</span></div>
|
||||
<div title="Code: 0xe879" class="the-icons span3"><i class="demo-icon icon-pin"></i> <span class="i-name">icon-pin</span><span class="i-code">0xe879</span></div>
|
||||
<div title="Code: 0xe87c" class="the-icons span3"><i class="demo-icon icon-circle"></i> <span class="i-name">icon-circle</span><span class="i-code">0xe87c</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container footer">Generated by <a href="http://fontello.com">fontello.com</a></div>
|
||||
|
@ -77,7 +77,7 @@ $hostFilter = '(host_name=' . implode('|host_name=', array_keys($pivotData)) . '
|
||||
),
|
||||
array(
|
||||
'aria-describedby' => $ariaDescribedById,
|
||||
'class' => 'bg-state-' . Service::getStateText($service->service_state) . ($service->service_handled ? ' handled' : ''),
|
||||
'class' => 'bg-color-' . Service::getStateText($service->service_state) . ($service->service_handled ? ' handled' : ''),
|
||||
'title' => $this->escape($service->service_output),
|
||||
'aria-label' => sprintf(
|
||||
$this->translate('Show detailed information for service %s on host %s'),
|
||||
|
@ -14,7 +14,11 @@
|
||||
<?= $this->translate('Reachable') ?>
|
||||
</th>
|
||||
<td>
|
||||
<?= $object->is_reachable ? $this->translate('Yes') : $this->translate('No') ?>
|
||||
<?php if ((bool) $object->is_reachable) {
|
||||
echo $this->icon('circle', $this->translate('Is reachable'), array('class' => 'fg-color-ok'));
|
||||
} else {
|
||||
echo $this->icon('circle', $this->translate('Not reachable'), array('class' => 'fg-color-critical'));
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
|
@ -1,82 +1,83 @@
|
||||
<?php
|
||||
|
||||
/** @var \Icinga\Module\Monitoring\Object\MonitoredObject $object */
|
||||
|
||||
if ($object->getType() === $object::TYPE_HOST) {
|
||||
$isService = false;
|
||||
$checkAttempts = $object->host_current_check_attempt . '/' . $object->host_max_check_attempts;
|
||||
$stateType = (int) $object->host_state_type;
|
||||
} else {
|
||||
$isService = true;
|
||||
$checkAttempts = $object->service_attempt;
|
||||
$stateType = (int) $object->service_state_type;
|
||||
}
|
||||
|
||||
$activeChecksEnabled = (bool) $object->active_checks_enabled;
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<th><?= $this->translate('Last check') ?></th>
|
||||
<th><?= $activeChecksEnabled ? $this->translate('Last check') : $this->translate('Last update') ?></th>
|
||||
<td data-base-target="_self">
|
||||
<?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
|
||||
echo $checkNowForm;
|
||||
} ?>
|
||||
<?= $this->timeAgo($object->last_check) ?>
|
||||
<?php if (isset($checkNowForm)) { // Form is unset if the current user lacks the respective permission
|
||||
echo $checkNowForm;
|
||||
} ?>
|
||||
<?php if ((int) $object->state !== 99) {
|
||||
echo $this->timeAgo($object->last_check);
|
||||
} ?>
|
||||
<?php if ($object->next_update < time()) {
|
||||
echo $this->icon('circle', $this->translate('Check result is late'), array('class' => 'fg-color-critical'));
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= $this->translate('Next check') ?></th>
|
||||
<td>
|
||||
<?php if ($this->hasPermission('monitoring/command/schedule-check')) {
|
||||
if ($isService) {
|
||||
echo $this->qlink(
|
||||
$this->translate('Reschedule'),
|
||||
'monitoring/service/reschedule-check',
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'reschedule',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate(
|
||||
'Schedule the next active check at a different time than the current one'
|
||||
)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo $this->qlink(
|
||||
$this->translate('Reschedule'),
|
||||
'monitoring/host/reschedule-check',
|
||||
array('host' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'reschedule',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate(
|
||||
'Schedule the next active check at a different time than the current one'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
} ?>
|
||||
<?= $this->timeUntil($object->next_check) ?>
|
||||
</td>
|
||||
<th><?= $activeChecksEnabled ? $this->translate('Next check') : $this->translate('Next update') ?></th>
|
||||
<td>
|
||||
<?php if ($activeChecksEnabled && $this->hasPermission('monitoring/command/schedule-check')) {
|
||||
if ($object->getType() === $object::TYPE_SERVICE) {
|
||||
echo $this->qlink(
|
||||
$this->translate('Reschedule'),
|
||||
'monitoring/service/reschedule-check',
|
||||
array('host' => $object->getHost()->getName(), 'service' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'reschedule',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate(
|
||||
'Schedule the next active check at a different time than the current one'
|
||||
)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
echo $this->qlink(
|
||||
$this->translate('Reschedule'),
|
||||
'monitoring/host/reschedule-check',
|
||||
array('host' => $object->getName()),
|
||||
array(
|
||||
'icon' => 'reschedule',
|
||||
'data-base-target' => '_self',
|
||||
'title' => $this->translate(
|
||||
'Schedule the next active check at a different time than the current one'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
} ?>
|
||||
<?php if ((int) $object->state !== 99) {
|
||||
if ($activeChecksEnabled) {
|
||||
echo $this->timeUntil($object->next_check);
|
||||
} else {
|
||||
echo sprintf($this->translate('expected %s'), $this->timeUntil($object->next_update));
|
||||
}
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th><?= $this->translate('Check attempts') ?></th>
|
||||
<?php if ($stateType === 0): ?>
|
||||
<td><?= $checkAttempts ?> (<?= $this->translate('soft state') ?>)</td>
|
||||
<?php else: ?>
|
||||
<td><?= $checkAttempts ?> (<?= $this->translate('hard state') ?>)</td>
|
||||
<?php endif; ?>
|
||||
<td>
|
||||
<?= $object->attempt ?>
|
||||
(<?= (int) $object->state_type === 0 ? $this->translate('soft state') : $this->translate('hard state') ?>)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if ($object->check_execution_time): ?>
|
||||
<tr>
|
||||
<th><?= $this->translate('Check execution time') ?></th>
|
||||
<td><?= $object->check_execution_time === null
|
||||
? '-' : round((float) $object->check_execution_time, 3)
|
||||
?>s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Check execution time') ?></th>
|
||||
<td><?= round((float) $object->check_execution_time, 3) ?>s</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($object->check_latency): ?>
|
||||
<tr>
|
||||
<th><?= $this->translate('Check latency') ?></th>
|
||||
<td><?= $object->check_latency ?>s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Check latency') ?></th>
|
||||
<td><?= $object->check_latency ?>s</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
|
@ -264,6 +264,14 @@ $dashboard->add(
|
||||
* Most Overdue
|
||||
*/
|
||||
$dashboard = $this->dashboard($this->translate('Overdue'));
|
||||
$dashboard->add(
|
||||
$this->translate('Late Host Check Results'),
|
||||
'monitoring/list/hosts?host_next_update<now'
|
||||
);
|
||||
$dashboard->add(
|
||||
$this->translate('Late Service Check Results'),
|
||||
'monitoring/list/services?service_next_update<now'
|
||||
);
|
||||
$dashboard->add(
|
||||
$this->translate('Acknowledgements Active For At Least Three Days'),
|
||||
'monitoring/list/comments?comment_type=Ack&comment_timestamp<-3 days&sort=comment_timestamp&dir=asc'
|
||||
|
@ -77,6 +77,20 @@ class HoststatusQuery extends IdoQuery
|
||||
'host_modified_host_attributes' => 'hs.modified_host_attributes',
|
||||
'host_next_check' => 'CASE hs.should_be_scheduled WHEN 1 THEN UNIX_TIMESTAMP(hs.next_check) ELSE NULL END',
|
||||
'host_next_notification' => 'UNIX_TIMESTAMP(hs.next_notification)',
|
||||
'host_next_update' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
|
||||
THEN
|
||||
NULL
|
||||
ELSE
|
||||
UNIX_TIMESTAMP(hs.last_check)
|
||||
+ CASE WHEN
|
||||
COALESCE(hs.current_state, 0) > 0 AND hs.state_type = 0
|
||||
THEN
|
||||
hs.retry_check_interval
|
||||
ELSE
|
||||
hs.normal_check_interval
|
||||
END * 60 * 2
|
||||
+ CEIL(hs.execution_time)
|
||||
END',
|
||||
'host_no_more_notifications' => 'hs.no_more_notifications',
|
||||
'host_normal_check_interval' => 'hs.normal_check_interval',
|
||||
'host_notifications_enabled' => 'hs.notifications_enabled',
|
||||
|
@ -19,9 +19,6 @@ class ServicestatusQuery extends IdoQuery
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected $columnMap = array(
|
||||
'instances' => array(
|
||||
'instance_name' => 'i.instance_name'
|
||||
),
|
||||
'hostgroups' => array(
|
||||
'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci',
|
||||
'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci',
|
||||
@ -48,8 +45,8 @@ class ServicestatusQuery extends IdoQuery
|
||||
'host_check_execution_time' => 'hs.execution_time',
|
||||
'host_check_latency' => 'hs.latency',
|
||||
'host_check_source' => 'hs.check_source',
|
||||
'host_check_type' => 'hs.check_type',
|
||||
'host_check_timeperiod_object_id' => 'hs.check_timeperiod_object_id',
|
||||
'host_check_type' => 'hs.check_type',
|
||||
'host_current_check_attempt' => 'hs.current_check_attempt',
|
||||
'host_current_notification_number' => 'hs.current_notification_number',
|
||||
'host_event_handler' => 'hs.event_handler',
|
||||
@ -92,10 +89,6 @@ class ServicestatusQuery extends IdoQuery
|
||||
'host_process_performance_data' => 'hs.process_performance_data',
|
||||
'host_retry_check_interval' => 'hs.retry_check_interval',
|
||||
'host_scheduled_downtime_depth' => 'hs.scheduled_downtime_depth',
|
||||
'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END',
|
||||
'host_state_type' => 'hs.state_type',
|
||||
'host_status_update_time' => 'hs.status_update_time',
|
||||
'host_unhandled' => 'CASE WHEN (hs.problem_has_been_acknowledged + hs.scheduled_downtime_depth) = 0 THEN 1 ELSE 0 END',
|
||||
'host_severity' => 'CASE WHEN hs.current_state = 0
|
||||
THEN
|
||||
CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL
|
||||
@ -131,7 +124,15 @@ class ServicestatusQuery extends IdoQuery
|
||||
CASE WHEN hs.state_type = 1
|
||||
THEN 8
|
||||
ELSE 0
|
||||
END'
|
||||
END',
|
||||
'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END',
|
||||
'host_state_type' => 'hs.state_type',
|
||||
'host_status_update_time' => 'hs.status_update_time',
|
||||
'host_unhandled' => 'CASE WHEN (hs.problem_has_been_acknowledged + hs.scheduled_downtime_depth) = 0 THEN 1 ELSE 0 END'
|
||||
|
||||
),
|
||||
'instances' => array(
|
||||
'instance_name' => 'i.instance_name'
|
||||
),
|
||||
'services' => array(
|
||||
'host' => 'so.name1 COLLATE latin1_general_ci',
|
||||
@ -154,65 +155,75 @@ class ServicestatusQuery extends IdoQuery
|
||||
'servicegroup_alias' => 'sg.alias COLLATE latin1_general_ci'
|
||||
),
|
||||
'servicestatus' => array(
|
||||
'service_state_type' => 'ss.state_type',
|
||||
'service_output' => 'ss.output',
|
||||
'service_long_output' => 'ss.long_output',
|
||||
'service_perfdata' => 'ss.perfdata',
|
||||
'service_check_source' => 'ss.check_source',
|
||||
'service_acknowledged' => 'ss.problem_has_been_acknowledged',
|
||||
'service_check_command' => 'ss.check_command',
|
||||
'service_last_time_ok' => 'ss.last_time_ok',
|
||||
'service_last_time_warning' => 'ss.last_time_warning',
|
||||
'service_last_time_critical' => 'ss.last_time_critical',
|
||||
'service_last_time_unknown' => 'ss.last_time_unknown',
|
||||
'service_current_check_attempt' => 'ss.current_check_attempt',
|
||||
'service_max_check_attempts' => 'ss.max_check_attempts',
|
||||
'service_attempt' => 'ss.current_check_attempt || \'/\' || ss.max_check_attempts',
|
||||
'service_last_check' => 'UNIX_TIMESTAMP(ss.last_check)',
|
||||
'service_next_check' => 'UNIX_TIMESTAMP(ss.next_check)',
|
||||
'service_check_type' => 'ss.check_type',
|
||||
'service_last_hard_state_change' => 'UNIX_TIMESTAMP(ss.last_hard_state_change)',
|
||||
'service_last_hard_state' => 'ss.last_hard_state',
|
||||
'service_last_notification' => 'UNIX_TIMESTAMP(ss.last_notification)',
|
||||
'service_next_notification' => 'UNIX_TIMESTAMP(ss.next_notification)',
|
||||
'service_no_more_notifications' => 'ss.no_more_notifications',
|
||||
'service_problem_has_been_acknowledged' => 'ss.problem_has_been_acknowledged',
|
||||
'service_acknowledgement_type' => 'ss.acknowledgement_type',
|
||||
'service_current_notification_number' => 'ss.current_notification_number',
|
||||
'service_percent_state_change' => 'ss.percent_state_change',
|
||||
'service_check_latency' => 'ss.latency',
|
||||
'service_check_execution_time' => 'ss.execution_time',
|
||||
'service_scheduled_downtime_depth' => 'ss.scheduled_downtime_depth',
|
||||
'service_failure_prediction_enabled' => 'ss.failure_prediction_enabled',
|
||||
'service_process_performance_data' => 'ss.process_performance_data',
|
||||
'service_modified_service_attributes' => 'ss.modified_service_attributes',
|
||||
'service_event_handler' => 'ss.event_handler',
|
||||
'service_normal_check_interval' => 'ss.normal_check_interval',
|
||||
'service_retry_check_interval' => 'ss.retry_check_interval',
|
||||
'service_check_timeperiod_object_id' => 'ss.check_timeperiod_object_id',
|
||||
'service_status_update_time' => 'ss.status_update_time',
|
||||
'service_passive_checks_enabled' => 'ss.passive_checks_enabled',
|
||||
'service_is_reachable' => 'ss.is_reachable',
|
||||
'service_passive_checks_enabled_changed' => 'CASE WHEN ss.passive_checks_enabled=s.passive_checks_enabled THEN 0 ELSE 1 END',
|
||||
'service_active_checks_enabled' => 'ss.active_checks_enabled',
|
||||
'service_active_checks_enabled_changed' => 'CASE WHEN ss.active_checks_enabled=s.active_checks_enabled THEN 0 ELSE 1 END',
|
||||
'service_attempt' => 'ss.current_check_attempt || \'/\' || ss.max_check_attempts',
|
||||
'service_check_command' => 'ss.check_command',
|
||||
'service_check_execution_time' => 'ss.execution_time',
|
||||
'service_check_latency' => 'ss.latency',
|
||||
'service_check_source' => 'ss.check_source',
|
||||
'service_check_timeperiod_object_id' => 'ss.check_timeperiod_object_id',
|
||||
'service_check_type' => 'ss.check_type',
|
||||
'service_current_check_attempt' => 'ss.current_check_attempt',
|
||||
'service_current_notification_number' => 'ss.current_notification_number',
|
||||
'service_event_handler' => 'ss.event_handler',
|
||||
'service_event_handler_enabled' => 'ss.event_handler_enabled',
|
||||
'service_event_handler_enabled_changed' => 'CASE WHEN ss.event_handler_enabled=s.event_handler_enabled THEN 0 ELSE 1 END',
|
||||
'service_failure_prediction_enabled' => 'ss.failure_prediction_enabled',
|
||||
'service_flap_detection_enabled' => 'ss.flap_detection_enabled',
|
||||
'service_flap_detection_enabled_changed' => 'CASE WHEN ss.flap_detection_enabled=s.flap_detection_enabled THEN 0 ELSE 1 END',
|
||||
'service_obsessing' => 'ss.obsess_over_service',
|
||||
'service_obsessing_changed' => 'CASE WHEN ss.obsess_over_service=s.obsess_over_service THEN 0 ELSE 1 END',
|
||||
'service_handled' => 'CASE WHEN (ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth + COALESCE(hs.current_state, 0)) > 0 THEN 1 ELSE 0 END',
|
||||
'service_hard_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE CASE WHEN ss.state_type = 1 THEN ss.current_state ELSE ss.last_hard_state END END',
|
||||
'service_in_downtime' => 'CASE WHEN (ss.scheduled_downtime_depth = 0 OR ss.scheduled_downtime_depth IS NULL) THEN 0 ELSE 1 END',
|
||||
'service_is_flapping' => 'ss.is_flapping',
|
||||
'service_is_passive_checked' => 'CASE WHEN ss.active_checks_enabled = 0 AND ss.passive_checks_enabled = 1 THEN 1 ELSE 0 END',
|
||||
'service_is_reachable' => 'ss.is_reachable',
|
||||
'service_last_check' => 'UNIX_TIMESTAMP(ss.last_check)',
|
||||
'service_last_hard_state' => 'ss.last_hard_state',
|
||||
'service_last_hard_state_change' => 'UNIX_TIMESTAMP(ss.last_hard_state_change)',
|
||||
'service_last_notification' => 'UNIX_TIMESTAMP(ss.last_notification)',
|
||||
'service_last_state_change' => 'UNIX_TIMESTAMP(ss.last_state_change)',
|
||||
'service_last_time_critical' => 'ss.last_time_critical',
|
||||
'service_last_time_ok' => 'ss.last_time_ok',
|
||||
'service_last_time_unknown' => 'ss.last_time_unknown',
|
||||
'service_last_time_warning' => 'ss.last_time_warning',
|
||||
'service_long_output' => 'ss.long_output',
|
||||
'service_max_check_attempts' => 'ss.max_check_attempts',
|
||||
'service_modified_service_attributes' => 'ss.modified_service_attributes',
|
||||
'service_next_check' => 'UNIX_TIMESTAMP(ss.next_check)',
|
||||
'service_next_notification' => 'UNIX_TIMESTAMP(ss.next_notification)',
|
||||
'service_next_update' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL
|
||||
THEN
|
||||
NULL
|
||||
ELSE
|
||||
UNIX_TIMESTAMP(ss.last_check)
|
||||
+ CASE WHEN
|
||||
COALESCE(ss.current_state, 0) > 0 AND ss.state_type = 0
|
||||
THEN
|
||||
ss.retry_check_interval
|
||||
ELSE
|
||||
ss.normal_check_interval
|
||||
END * 60 * 2
|
||||
+ CEIL(ss.execution_time)
|
||||
END',
|
||||
'service_no_more_notifications' => 'ss.no_more_notifications',
|
||||
'service_normal_check_interval' => 'ss.normal_check_interval',
|
||||
'service_notifications_enabled' => 'ss.notifications_enabled',
|
||||
'service_notifications_enabled_changed' => 'CASE WHEN ss.notifications_enabled=s.notifications_enabled THEN 0 ELSE 1 END',
|
||||
'service_in_downtime' => 'CASE WHEN (ss.scheduled_downtime_depth = 0 OR ss.scheduled_downtime_depth IS NULL) THEN 0 ELSE 1 END',
|
||||
'service_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE ss.current_state END',
|
||||
'service_unhandled' => 'CASE WHEN (ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth + COALESCE(hs.current_state, 0)) = 0 THEN 1 ELSE 0 END',
|
||||
'service_obsessing' => 'ss.obsess_over_service',
|
||||
'service_obsessing_changed' => 'CASE WHEN ss.obsess_over_service=s.obsess_over_service THEN 0 ELSE 1 END',
|
||||
'service_output' => 'ss.output',
|
||||
'service_passive_checks_enabled' => 'ss.passive_checks_enabled',
|
||||
'service_passive_checks_enabled_changed' => 'CASE WHEN ss.passive_checks_enabled=s.passive_checks_enabled THEN 0 ELSE 1 END',
|
||||
'service_percent_state_change' => 'ss.percent_state_change',
|
||||
'service_perfdata' => 'ss.perfdata',
|
||||
'service_problem' => 'CASE WHEN COALESCE(ss.current_state, 0) = 0 THEN 0 ELSE 1 END',
|
||||
'service_problem_has_been_acknowledged' => 'ss.problem_has_been_acknowledged',
|
||||
'service_process_performance_data' => 'ss.process_performance_data',
|
||||
'service_retry_check_interval' => 'ss.retry_check_interval',
|
||||
'service_scheduled_downtime_depth' => 'ss.scheduled_downtime_depth',
|
||||
'service_severity' => 'CASE WHEN ss.current_state = 0
|
||||
THEN
|
||||
CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL
|
||||
@ -253,7 +264,11 @@ class ServicestatusQuery extends IdoQuery
|
||||
CASE WHEN ss.state_type = 1
|
||||
THEN 8
|
||||
ELSE 0
|
||||
END'
|
||||
END',
|
||||
'service_state' => 'CASE WHEN ss.has_been_checked = 0 OR ss.has_been_checked IS NULL THEN 99 ELSE ss.current_state END',
|
||||
'service_state_type' => 'ss.state_type',
|
||||
'service_status_update_time' => 'ss.status_update_time',
|
||||
'service_unhandled' => 'CASE WHEN (ss.problem_has_been_acknowledged + ss.scheduled_downtime_depth + COALESCE(hs.current_state, 0)) = 0 THEN 1 ELSE 0 END'
|
||||
)
|
||||
);
|
||||
|
||||
@ -282,18 +297,6 @@ class ServicestatusQuery extends IdoQuery
|
||||
$this->joinedVirtualTables['services'] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Join instances
|
||||
*/
|
||||
protected function joinInstances()
|
||||
{
|
||||
$this->select->join(
|
||||
array('i' => $this->prefix . 'instances'),
|
||||
'i.instance_id = so.instance_id',
|
||||
array()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Join host groups
|
||||
*/
|
||||
@ -338,6 +341,18 @@ class ServicestatusQuery extends IdoQuery
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Join instances
|
||||
*/
|
||||
protected function joinInstances()
|
||||
{
|
||||
$this->select->join(
|
||||
array('i' => $this->prefix . 'instances'),
|
||||
'i.instance_id = so.instance_id',
|
||||
array()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Join service groups
|
||||
*/
|
||||
|
@ -89,9 +89,6 @@ class Host extends MonitoredObject
|
||||
protected function getDataView()
|
||||
{
|
||||
$columns = array(
|
||||
'instance_name',
|
||||
'host_icon_image',
|
||||
'host_icon_image_alt',
|
||||
'host_acknowledged',
|
||||
'host_acknowledgement_type',
|
||||
'host_action_url',
|
||||
@ -99,6 +96,7 @@ class Host extends MonitoredObject
|
||||
'host_active_checks_enabled_changed',
|
||||
'host_address',
|
||||
'host_alias',
|
||||
'host_attempt',
|
||||
'host_check_command',
|
||||
'host_check_execution_time',
|
||||
'host_check_latency',
|
||||
@ -111,6 +109,8 @@ class Host extends MonitoredObject
|
||||
'host_flap_detection_enabled',
|
||||
'host_flap_detection_enabled_changed',
|
||||
'host_handled',
|
||||
'host_icon_image',
|
||||
'host_icon_image_alt',
|
||||
'host_in_downtime',
|
||||
'host_is_flapping',
|
||||
'host_is_reachable',
|
||||
@ -121,6 +121,7 @@ class Host extends MonitoredObject
|
||||
'host_max_check_attempts',
|
||||
'host_name',
|
||||
'host_next_check',
|
||||
'host_next_update',
|
||||
'host_notes',
|
||||
'host_notes_url',
|
||||
'host_notifications_enabled',
|
||||
@ -134,7 +135,8 @@ class Host extends MonitoredObject
|
||||
'host_perfdata',
|
||||
'host_process_perfdata' => 'host_process_performance_data',
|
||||
'host_state',
|
||||
'host_state_type'
|
||||
'host_state_type',
|
||||
'instance_name',
|
||||
);
|
||||
if ($this->backend->getType() === 'livestatus') {
|
||||
$columns[] = 'host_contacts';
|
||||
|
@ -149,6 +149,7 @@ class Service extends MonitoredObject
|
||||
'service_last_state_change',
|
||||
'service_long_output',
|
||||
'service_next_check',
|
||||
'service_next_update',
|
||||
'service_notes',
|
||||
'service_notes_url',
|
||||
'service_notifications_enabled',
|
||||
|
@ -1,11 +1,11 @@
|
||||
/*! Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
||||
|
||||
.bg-state-ok,
|
||||
.bg-state-up {
|
||||
.bg-color-ok,
|
||||
.bg-color-up {
|
||||
background-color: @colorOk;
|
||||
}
|
||||
|
||||
.bg-state-warning {
|
||||
.bg-color-warning {
|
||||
background-color: @colorWarning;
|
||||
|
||||
&.handled {
|
||||
@ -13,8 +13,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bg-state-critical,
|
||||
.bg-state-down {
|
||||
.bg-color-critical,
|
||||
.bg-color-down {
|
||||
background-color: @colorCritical;
|
||||
|
||||
&.handled {
|
||||
@ -22,7 +22,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bg-state-unreachable {
|
||||
.bg-color-unreachable {
|
||||
background-color: @colorUnreachable;
|
||||
|
||||
&.handled {
|
||||
@ -30,7 +30,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bg-state-unknown {
|
||||
.bg-color-unknown {
|
||||
background-color: @colorUnknown;
|
||||
|
||||
&.handled {
|
||||
@ -38,6 +38,48 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bg-state-pending {
|
||||
.bg-color-pending {
|
||||
background-color: @colorPending;
|
||||
}
|
||||
|
||||
.fg-color-ok,
|
||||
.fg-color-up {
|
||||
color: @colorOk;
|
||||
}
|
||||
|
||||
.fg-color-warning {
|
||||
color: @colorWarning;
|
||||
|
||||
&.handled {
|
||||
color: @colorWarningHandled;
|
||||
}
|
||||
}
|
||||
|
||||
.fg-color-critical,
|
||||
.fg-color-down {
|
||||
color: @colorCritical;
|
||||
|
||||
&.handled {
|
||||
color: @colorCriticalHandled;
|
||||
}
|
||||
}
|
||||
|
||||
.fg-color-unreachable {
|
||||
color: @colorUnreachable;
|
||||
|
||||
&.handled {
|
||||
color: @colorUnreachableHandled;
|
||||
}
|
||||
}
|
||||
|
||||
.fg-color-unknown {
|
||||
color: @colorUnknown;
|
||||
|
||||
&.handled {
|
||||
color: @colorUnknownHandled;
|
||||
}
|
||||
}
|
||||
|
||||
.fg-color-pending {
|
||||
color: @colorPending;
|
||||
}
|
||||
|
Binary file not shown.
@ -128,6 +128,9 @@
|
||||
<glyph glyph-name="right-small" unicode="" d="m328 595q15 15 36 15t37-15l245-245-245-245q-15-15-36-15-22 0-37 15t-15 37 15 37l120 119-395 0q-22 0-37 15t-16 37 16 37 37 16l395 0-120 118q-15 15-15 37t15 37z" horiz-adv-x="646" />
|
||||
<glyph glyph-name="up-small" unicode="" d="m260 673l245-245q15-15 15-37t-15-37-36-15-36 15l-120 120 0-395q0-21-16-37t-37-15-36 15-15 37l0 395-120-120q-15-15-37-15t-37 15-15 37 15 37z" horiz-adv-x="520" />
|
||||
<glyph glyph-name="pin" unicode="" d="m573 37q0-23-15-38t-37-15q-21 0-37 16l-169 169-315-236 236 315-168 169q-24 23-12 56 14 32 48 32 157 0 270 57 90 45 151 171 9 24 36 32t50-13l208-209q21-23 14-50t-32-36q-127-63-172-152-56-110-56-268z" horiz-adv-x="834" />
|
||||
<glyph glyph-name="ok-circled" unicode="" d="m717 440q0 16-11 26l-50 50q-11 11-25 11t-26-11l-227-227-126 126q-11 11-25 11t-26-11l-50-50q-10-10-10-26 0-15 10-25l202-202q10-10 25-10 15 0 25 10l303 303q11 10 11 25z m140-90q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="attention-circled" unicode="" d="m429 779q116 0 215-58t156-156 57-215-57-215-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58z m71-696v106q0 8-5 13t-12 5h-107q-8 0-13-5t-6-13v-106q0-8 6-13t13-6h107q7 0 12 6t5 13z m-1 192l10 346q0 7-6 10-5 5-13 5h-123q-8 0-13-5-6-3-6-10l10-346q0-6 5-10t14-4h103q8 0 13 4t6 10z" horiz-adv-x="857.1" />
|
||||
<glyph glyph-name="circle" unicode="" d="m857 350q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
|
||||
</font>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 55 KiB |
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user