Change the way how boxed status information is presented to the user

This commit is contained in:
Johannes Meyer 2014-03-07 16:43:22 +01:00
parent d575356df1
commit e8a626e896
11 changed files with 435 additions and 379 deletions

View File

@ -390,17 +390,17 @@ class Monitoring_ListController extends MonitoringController
array( array(
'hostgroup', 'hostgroup',
'hosts_up', 'hosts_up',
'hosts_unreachable', 'hosts_unreachable_handled',
'hosts_unreachable_unhandled', 'hosts_unreachable_unhandled',
'hosts_down', 'hosts_down_handled',
'hosts_down_unhandled', 'hosts_down_unhandled',
'hosts_pending', 'hosts_pending',
'services_ok', 'services_ok',
'services_unknown', 'services_unknown_handled',
'services_unknown_unhandled', 'services_unknown_unhandled',
'services_critical', 'services_critical_handled',
'services_critical_unhandled', 'services_critical_unhandled',
'services_warning', 'services_warning_handled',
'services_warning_unhandled', 'services_warning_unhandled',
'services_pending' 'services_pending'
) )

View File

@ -25,12 +25,10 @@ class Monitoring_TacticalController extends MonitoringController
'hosts_up_not_checked', 'hosts_up_not_checked',
'hosts_pending', 'hosts_pending',
'hosts_pending_not_checked', 'hosts_pending_not_checked',
'hosts_down',
'hosts_down_handled', 'hosts_down_handled',
'hosts_down_unhandled', 'hosts_down_unhandled',
'hosts_down_passive', 'hosts_down_passive',
'hosts_down_not_checked', 'hosts_down_not_checked',
'hosts_unreachable',
'hosts_unreachable_handled', 'hosts_unreachable_handled',
'hosts_unreachable_unhandled', 'hosts_unreachable_unhandled',
'hosts_unreachable_passive', 'hosts_unreachable_passive',
@ -40,15 +38,15 @@ class Monitoring_TacticalController extends MonitoringController
'services_ok_not_checked_on_ok_hosts', 'services_ok_not_checked_on_ok_hosts',
'services_pending_on_ok_hosts', 'services_pending_on_ok_hosts',
'services_pending_not_checked_on_ok_hosts', 'services_pending_not_checked_on_ok_hosts',
'services_warning_on_ok_hosts', 'services_warning_handled_on_ok_hosts',
'services_warning_unhandled_on_ok_hosts', 'services_warning_unhandled_on_ok_hosts',
'services_warning_passive_on_ok_hosts', 'services_warning_passive_on_ok_hosts',
'services_warning_not_checked_on_ok_hosts', 'services_warning_not_checked_on_ok_hosts',
'services_critical_on_ok_hosts', 'services_critical_handled_on_ok_hosts',
'services_critical_unhandled_on_ok_hosts', 'services_critical_unhandled_on_ok_hosts',
'services_critical_passive_on_ok_hosts', 'services_critical_passive_on_ok_hosts',
'services_critical_not_checked_on_ok_hosts', 'services_critical_not_checked_on_ok_hosts',
'services_unknown_on_ok_hosts', 'services_unknown_handled_on_ok_hosts',
'services_unknown_unhandled_on_ok_hosts', 'services_unknown_unhandled_on_ok_hosts',
'services_unknown_passive_on_ok_hosts', 'services_unknown_passive_on_ok_hosts',
'services_unknown_not_checked_on_ok_hosts', 'services_unknown_not_checked_on_ok_hosts',
@ -56,15 +54,15 @@ class Monitoring_TacticalController extends MonitoringController
'services_ok_not_checked_on_problem_hosts', 'services_ok_not_checked_on_problem_hosts',
'services_pending_on_problem_hosts', 'services_pending_on_problem_hosts',
'services_pending_not_checked_on_problem_hosts', 'services_pending_not_checked_on_problem_hosts',
'services_warning_on_problem_hosts', 'services_warning_handled_on_problem_hosts',
'services_warning_unhandled_on_problem_hosts', 'services_warning_unhandled_on_problem_hosts',
'services_warning_passive_on_problem_hosts', 'services_warning_passive_on_problem_hosts',
'services_warning_not_checked_on_problem_hosts', 'services_warning_not_checked_on_problem_hosts',
'services_critical_on_problem_hosts', 'services_critical_handled_on_problem_hosts',
'services_critical_unhandled_on_problem_hosts', 'services_critical_unhandled_on_problem_hosts',
'services_critical_passive_on_problem_hosts', 'services_critical_passive_on_problem_hosts',
'services_critical_not_checked_on_problem_hosts', 'services_critical_not_checked_on_problem_hosts',
'services_unknown_on_problem_hosts', 'services_unknown_handled_on_problem_hosts',
'services_unknown_unhandled_on_problem_hosts', 'services_unknown_unhandled_on_problem_hosts',
'services_unknown_passive_on_problem_hosts', 'services_unknown_passive_on_problem_hosts',
'services_unknown_not_checked_on_problem_hosts', 'services_unknown_not_checked_on_problem_hosts',

View File

@ -14,25 +14,16 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Hosts</th> <th><?= $this->translate('Hosts'); ?></th>
<th>Services</th> <th><?= $this->translate('Services'); ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td> <td>
<?php if ($h->hosts_down): ?> <?php if ($h->hosts_down_handled || $h->hosts_down_unhandled): ?>
<!-- Hosts DOWN --> <!-- Hosts DOWN -->
<div class="box entry state_down <?= $h->hosts_down_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_down <?= $h->hosts_down_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/hosts',
array(
'host_state' => 1,
'hostgroup' => $h->hostgroup
)
); ?>" title="Hosts DOWN">
<?= $h->hosts_down ?> DOWN
</a>
<?php if ($h->hosts_down_unhandled): ?> <?php if ($h->hosts_down_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/hosts', 'monitoring/list/hosts',
@ -42,24 +33,27 @@
'hostgroup' => $h->hostgroup 'hostgroup' => $h->hostgroup
) )
); ?>" title="Hosts DOWN Unhandled"> ); ?>" title="Hosts DOWN Unhandled">
<?= $h->hosts_down_unhandled ?> Unhandled <?= $h->hosts_down_unhandled; ?> DOWN
</a>
<?php endif ?>
<?php if ($h->hosts_down_handled): ?>
<a href="<?= $this->href(
'monitoring/list/hosts',
array(
'host_state' => 1,
'host_handled' => 1,
'hostgroup' => $h->hostgroup
)
); ?>" title="Hosts DOWN Handled">
<?= $h->hosts_down_handled . ' ' . ($h->hosts_down_unhandled ? $this->translate('Acknowledged') : 'DOWN'); ?>
</a> </a>
<?php endif ?> <?php endif ?>
</div> </div>
<!-- End of Hosts DOWN --> <!-- End of Hosts DOWN -->
<?php endif ?> <?php endif ?>
<?php if ($h->hosts_unreachable): ?> <?php if ($h->hosts_unreachable_handled || $h->hosts_unreachable_unhandled): ?>
<!-- Hosts UNREACHABLE --> <!-- Hosts UNREACHABLE -->
<div class="box entry state_unreachable <?= $h->hosts_unreachable_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_unreachable <?= $h->hosts_unreachable_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/hosts',
array(
'host_state' => 2,
'hostgroup' => $h->hostgroup
)
); ?>" title="Hosts UNREACHABLE">
<?= $h->hosts_unreachable ?> UNREACHABLE
</a>
<?php if ($h->hosts_unreachable_unhandled): ?> <?php if ($h->hosts_unreachable_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/hosts', 'monitoring/list/hosts',
@ -69,7 +63,19 @@
'hostgroup' => $h->hostgroup 'hostgroup' => $h->hostgroup
) )
); ?>" title="Hosts UNREACHABLE Unhandled"> ); ?>" title="Hosts UNREACHABLE Unhandled">
<?= $h->hosts_unreachable_unhandled ?> Unhandled <?= $h->hosts_unreachable_unhandled; ?> UNREACHABLE
</a>
<?php endif ?>
<?php if ($h->hosts_unreachable_handled): ?>
<a href="<?= $this->href(
'monitoring/list/hosts',
array(
'host_state' => 2,
'host_handled' => 1,
'hostgroup' => $h->hostgroup
)
); ?>" title="Hosts UNREACHABLE Handled">
<?= $h->hosts_unreachable_handled . ' ' . ($h->hosts_unreachable_unhandled ? $this->translate('Acknowledged') : 'UNREACHABLE'); ?>
</a> </a>
<?php endif ?> <?php endif ?>
</div> </div>
@ -85,7 +91,7 @@
'hostgroup' => $h->hostgroup 'hostgroup' => $h->hostgroup
) )
); ?>" title="Hosts UP"> ); ?>" title="Hosts UP">
<?= $h->hosts_up ?> UP <?= $h->hosts_up; ?> UP
</a> </a>
</div> </div>
<!-- End of Hosts UP --> <!-- End of Hosts UP -->
@ -100,91 +106,110 @@
'hostgroup' => $h->hostgroup 'hostgroup' => $h->hostgroup
) )
); ?>" title="Hosts PENDING"> ); ?>" title="Hosts PENDING">
<?= $h->hosts_pending ?> PENDING <?= $h->hosts_pending; ?> PENDING
</a> </a>
</div> </div>
<!-- End of Hosts PENDING --> <!-- End of Hosts PENDING -->
<?php endif ?> <?php endif ?>
</td> </td>
<td> <td>
<?php if ($h->services_critical): ?> <?php if ($h->services_critical_handled || $h->services_critical_unhandled): ?>
<!-- Services CRITICAL --> <!-- Services CRITICAL -->
<div class="box entry state_critical <?= $h->services_critical_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_critical <?= $h->services_critical_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/services',
array(
'service_state' => 2,
'hostgroup' => $h->hostgroup,
'sort' => 'service_severity'
)
); ?>" title="Services CRITICAL">
<?= $h->services_critical ?> CRITICAL
</a>
<?php if ($h->services_critical_unhandled): ?> <?php if ($h->services_critical_unhandled): ?>
<a href="<?= $this->href(
'monitoring/list/services',
array(
'service_state' => 2,
'service_acknowledged' => 0,
'service_in_downtime' => 0,
'host_problem' => 0,
'hostgroup' => $h->hostgroup,
'sort' => 'service_severity'
)
); ?>" title="Services CRITICAL Unhandled">
<?= $h->services_critical_unhandled; ?> CRITICAL
</a>
<?php endif ?>
<?php if ($h->services_critical_handled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/services', 'monitoring/list/services',
array( array(
'service_state' => 2, 'service_state' => 2,
'service_unhandled' => 1, 'service_handled' => 1,
'hostgroup' => $h->hostgroup, 'hostgroup' => $h->hostgroup,
'sort' => 'service_severity' 'sort' => 'service_severity'
) )
); ?>" title="Services CRITICAL Unhandled"> ); ?>" title="Services CRITICAL Handled">
<?= $h->services_critical_unhandled ?> Unhandled <?= $h->services_critical_handled . ' ' . ($h->services_critical_unhandled ? $this->translate('Acknowledged') : 'CRITICAL'); ?>
</a> </a>
<?php endif ?> <?php endif ?>
</div> </div>
<!-- End of Services CRITICAL --> <!-- End of Services CRITICAL -->
<?php endif ?> <?php endif ?>
<?php if ($h->services_warning): ?> <?php if ($h->services_warning_handled || $h->services_warning_unhandled): ?>
<!-- Services WARNING --> <!-- Services WARNING -->
<div class="box entry state_warning <?= $h->services_warning_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_warning <?= $h->services_warning_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/services',
array(
'service_state' => 1,
'hostgroup' => $h->hostgroup
)
); ?>" title="Services WARNING">
<?= $h->services_warning ?> WARNING
</a>
<?php if ($h->services_warning_unhandled): ?> <?php if ($h->services_warning_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/services', 'monitoring/list/services',
array( array(
'service_state' => 1, 'service_state' => 1,
'service_unhandled' => 1, 'service_acknowledged' => 0,
'hostgroup' => $h->hostgroup 'service_in_downtime' => 0,
'host_problem' => 0,
'hostgroup' => $h->hostgroup,
'sort' => 'service_severity'
) )
); ?>" title="Services WARNING Unhandled"> ); ?>" title="Services WARNING Unhandled">
<?= $h->services_warning_unhandled ?> Unhandled <?= $h->services_warning_unhandled; ?> WARNING
</a>
<?php endif ?>
<?php if ($h->services_warning_handled): ?>
<a href="<?= $this->href(
'monitoring/list/services',
array(
'service_state' => 1,
'service_handled' => 1,
'hostgroup' => $h->hostgroup,
'sort' => 'service_severity'
)
); ?>" title="Services WARNING Handled">
<?= $h->services_warning_handled . ' ' . ($h->services_warning_unhandled ? $this->translate('Acknowledged') : 'WARNING'); ?>
</a> </a>
<?php endif ?> <?php endif ?>
</div> </div>
<!-- End of Services WARNING --> <!-- End of Services WARNING -->
<?php endif ?> <?php endif ?>
<?php if ($h->services_unknown): ?> <?php if ($h->services_unknown_handled || $h->services_unknown_unhandled): ?>
<!-- Services UNKNOWN --> <!-- Services UNKNOWN -->
<div class="box entry state_unknown"> <div class="box entry state_unknown <?= $h->services_unknown_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/services',
array(
'service_state' => 3,
'hostgroup' => $h->hostgroup
)
); ?>" title="Services UNKNOWN">
<?= $h->services_unknown ?> UNKNOWN
</a>
<?php if ($h->services_unknown_unhandled): ?> <?php if ($h->services_unknown_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/services', 'monitoring/list/services',
array( array(
'service_state' => 3, 'service_state' => 3,
'service_unhandled' => 1, 'service_acknowledged' => 0,
'hostgroup' => $h->hostgroup 'service_in_downtime' => 0,
'host_problem' => 0,
'hostgroup' => $h->hostgroup,
'sort' => 'service_severity'
) )
); ?>" title="Services UNKNOWN Unhandled"> ); ?>" title="Services UNKNOWN Unhandled">
<?= $h->services_unknown_unhandled ?> Unhandled <?= $h->services_unknown_unhandled; ?> UNKNOWN
</a>
<?php endif ?>
<?php if ($h->services_unknown_handled): ?>
<a href="<?= $this->href(
'monitoring/list/services',
array(
'service_state' => 3,
'service_handled' => 1,
'hostgroup' => $h->hostgroup,
'sort' => 'service_severity'
)
); ?>" title="Services UNKNOWN Handled">
<?= $h->services_unknown_handled . ' ' . ($h->services_unknown_unhandled ? $this->translate('Acknowledged') : 'UNKNOWN'); ?>
</a> </a>
<?php endif ?> <?php endif ?>
</div> </div>
@ -197,10 +222,11 @@
'monitoring/list/services', 'monitoring/list/services',
array( array(
'service_state' => 0, 'service_state' => 0,
'hostgroup' => $h->hostgroup 'hostgroup' => $h->hostgroup,
'sort' => 'service_severity'
) )
); ?>" title="Services OK"> ); ?>" title="Services OK">
<?= $h->services_ok ?> OK <?= $h->services_ok; ?> OK
</a> </a>
</div> </div>
<!-- End of Services OK --> <!-- End of Services OK -->
@ -212,10 +238,11 @@
'monitoring/list/services', 'monitoring/list/services',
array( array(
'service_state' => 99, 'service_state' => 99,
'hostgroup' => $h->hostgroup 'hostgroup' => $h->hostgroup,
'sort' => 'service_severity'
) )
); ?>" title="Services PENDING"> ); ?>" title="Services PENDING">
<?= $h->services_pending ?> PENDING <?= $h->services_pending; ?> PENDING
</a> </a>
</div> </div>
<!-- End of Services PENDING --> <!-- End of Services PENDING -->

View File

@ -5,238 +5,257 @@
<?php endif ?> <?php endif ?>
<div class="content"> <div class="content">
<div class="boxview" data-base-target="col2"> <div class="boxview" data-base-target="col2">
<?php foreach($servicegroups as $servicegroup): ?> <?php foreach($servicegroups as $servicegroup): ?>
<?php <div class="box servicegroup">
foreach(array( <a href="<?= $this->href(
'hosts_down', 'monitoring/list/services',
'hosts_unreachable', array('servicegroup' => $servicegroup->servicegroup)
'services_critical', ); ?>">
'services_warning', <h2><?= $servicegroup->servicegroup; ?></h2>
'services_unknown' </a>
) as $status) <div class="box contents">
$servicegroup->{$status} = (string)((int)$servicegroup->{$status . '_handled'} <table>
+ (int)$servicegroup->{$status . '_unhandled'}); <thead>
?> <tr>
<div class="box servicegroup"> <th><?= $this->translate('Hosts'); ?></th>
<a href="<?= $this->href('monitoring/list/services', array('servicegroup' => $servicegroup->servicegroup)); ?>"> <th><?= $this->translate('Services'); ?></th>
<h2><?= $servicegroup->servicegroup; ?></h2> </tr>
</a> </thead>
<div class="box contents"> <tbody>
<table> <tr>
<thead> <td>
<tr> <?php if ($servicegroup->hosts_down_handled || $servicegroup->hosts_down_unhandled): ?>
<th>Hosts</th> <!-- Hosts DOWN -->
<th>Services</th> <div class="box entry state_down <?= $servicegroup->hosts_down_unhandled ? '' : 'handled'; ?>">
</tr> <?php if ($servicegroup->hosts_down_unhandled): ?>
</thead> <a href="<?= $this->href(
<tbody> 'monitoring/list/hosts',
<tr> array(
<td> 'host_state' => 1,
<?php if ($servicegroup->hosts_down): ?> 'host_unhandled' => 1,
<!-- Hosts DOWN --> 'servicegroup' => $servicegroup->servicegroup
<div class="box entry state_down <?= $servicegroup->hosts_down_unhandled ? '' : 'handled'; ?>"> )
<a href="<?= $this->href( ); ?>" title="Hosts DOWN Unhandled">
'monitoring/list/hosts', <?= $servicegroup->hosts_down_unhandled; ?> DOWN
array( </a>
'host_state' => 1, <?php endif ?>
'servicegroup' => $servicegroup->servicegroup <?php if ($servicegroup->hosts_down_handled): ?>
) <a href="<?= $this->href(
); ?>" title="Hosts DOWN"> 'monitoring/list/hosts',
<?= $servicegroup->hosts_down ?> DOWN array(
</a> 'host_state' => 1,
<?php if ($servicegroup->hosts_down_unhandled): ?> 'host_handled' => 1,
<a href="<?= $this->href( 'servicegroup' => $servicegroup->servicegroup
'monitoring/list/hosts', )
array( ); ?>" title="Hosts DOWN Handled">
'host_state' => 1, <?= $servicegroup->hosts_down_handled . ' ' . ($servicegroup->hosts_down_unhandled ? $this->translate('Acknowledged') : 'DOWN'); ?>
'host_unhandled' => 1, </a>
'servicegroup' => $servicegroup->servicegroup <?php endif ?>
) </div>
); ?>" title="Hosts DOWN Unhandled"> <!-- End of Hosts DOWN -->
<?= $servicegroup->hosts_down_unhandled ?> Unhandled <?php endif ?>
</a> <?php if ($servicegroup->hosts_unreachable_handled || $servicegroup->hosts_unreachable_unhandled): ?>
<?php endif ?> <!-- Hosts UNREACHABLE -->
</div> <div class="box entry state_unreachable <?= $servicegroup->hosts_unreachable_unhandled ? '' : 'handled'; ?>">
<!-- End of Hosts DOWN --> <?php if ($servicegroup->hosts_unreachable_unhandled): ?>
<?php endif ?> <a href="<?= $this->href(
<?php if ($servicegroup->hosts_unreachable): ?> 'monitoring/list/hosts',
<!-- Hosts UNREACHABLE --> array(
<div class="box entry state_unreachable <?= $servicegroup->hosts_unreachable_unhandled ? '' : 'handled'; ?>"> 'host_state' => 2,
<a href="<?= $this->href( 'host_unhandled' => 1,
'monitoring/list/hosts', 'servicegroup' => $servicegroup->servicegroup
array( )
'host_state' => 2, ); ?>" title="Hosts UNREACHABLE Unhandled">
'servicegroup' => $servicegroup->servicegroup <?= $servicegroup->hosts_unreachable_unhandled; ?> UNREACHABLE
) </a>
); ?>" title="Hosts UNREACHABLE"> <?php endif ?>
<?= $servicegroup->hosts_unreachable ?> UNREACHABLE <?php if ($servicegroup->hosts_unreachable_handled): ?>
</a> <a href="<?= $this->href(
<?php if ($servicegroup->hosts_unreachable_unhandled): ?> 'monitoring/list/hosts',
<a href="<?= $this->href( array(
'monitoring/list/hosts', 'host_state' => 2,
array( 'host_handled' => 1,
'host_state' => 2, 'servicegroup' => $servicegroup->servicegroup
'host_unhandled' => 1, )
'servicegroup' => $servicegroup->servicegroup ); ?>" title="Hosts UNREACHABLE Handled">
) <?= $servicegroup->hosts_unreachable_handled . ' ' . ($servicegroup->hosts_unreachable_unhandled ? $this->translate('Acknowledged') : 'UNREACHABLE'); ?>
); ?>" title="Hosts UNREACHABLE Unhandled"> </a>
<?= $servicegroup->hosts_unreachable_unhandled ?> Unhandled <?php endif ?>
</a> </div>
<?php endif ?> <!-- End of Hosts UNREACHABLE -->
</div> <?php endif ?>
<!-- End of Hosts UNREACHABLE --> <?php if ($servicegroup->hosts_up): ?>
<?php endif ?> <!-- Hosts UP -->
<?php if ($servicegroup->hosts_up): ?> <div class="box entry state_up">
<!-- Hosts UP --> <a href="<?= $this->href(
<div class="box entry state_up"> 'monitoring/list/hosts',
<a href="<?= $this->href( array(
'monitoring/list/hosts', 'host_state' => 0,
array( 'servicegroup' => $servicegroup->servicegroup
'host_state' => 0, )
'servicegroup' => $servicegroup->servicegroup ); ?>" title="Hosts UP">
) <?= $servicegroup->hosts_up; ?> UP
); ?>" title="Hosts UP"> </a>
<?= $servicegroup->hosts_up ?> UP </div>
</a> <!-- End of Hosts UP -->
</div> <?php endif ?>
<!-- End of Hosts UP --> <?php if ($servicegroup->hosts_pending): ?>
<?php endif ?> <!-- Hosts PENDING -->
<?php if ($servicegroup->hosts_pending): ?> <div class="box entry state_pending">
<!-- Hosts PENDING --> <a href="<?= $this->href(
<div class="box entry state_pending"> 'monitoring/list/hosts',
<a href="<?= $this->href( array(
'monitoring/list/hosts', 'host_state' => 99,
array( 'servicegroup' => $servicegroup->servicegroup
'host_state' => 99, )
'servicegroup' => $servicegroup->servicegroup ); ?>" title="Hosts PENDING">
) <?= $servicegroup->hosts_pending; ?> PENDING
); ?>" title="Hosts PENDING"> </a>
<?= $servicegroup->hosts_pending ?> PENDING </div>
</a> <!-- End of Hosts PENDING -->
</div> <?php endif ?>
<!-- End of Hosts PENDING --> </td>
<?php endif ?> <td>
</td> <?php if ($servicegroup->services_critical_handled || $servicegroup->services_critical_unhandled): ?>
<td> <!-- Services CRITICAL -->
<?php if ($servicegroup->services_critical): ?> <div class="box entry state_critical <?= $servicegroup->services_critical_unhandled ? '' : 'handled'; ?>">
<!-- Services CRITICAL --> <?php if ($servicegroup->services_critical_unhandled): ?>
<div class="box entry state_critical <?= $servicegroup->services_critical_unhandled ? '' : 'handled'; ?>"> <a href="<?= $this->href(
<a href="<?= $this->href( 'monitoring/list/services',
'monitoring/list/services', array(
array( 'service_state' => 2,
'service_state' => 2, 'service_acknowledged' => 0,
'servicegroup' => $servicegroup->servicegroup, 'service_in_downtime' => 0,
'sort' => 'service_severity' 'host_problem' => 0,
) 'servicegroup' => $servicegroup->servicegroup,
); ?>" title="Services CRITICAL"> 'sort' => 'service_severity'
<?= $servicegroup->services_critical ?> CRITICAL )
</a> ); ?>" title="Services CRITICAL Unhandled">
<?php if ($servicegroup->services_critical_unhandled): ?> <?= $servicegroup->services_critical_unhandled; ?> CRITICAL
<a href="<?= $this->href( </a>
'monitoring/list/services', <?php endif ?>
array( <?php if ($servicegroup->services_critical_handled): ?>
'service_state' => 2, <a href="<?= $this->href(
'service_unhandled' => 1, 'monitoring/list/services',
'servicegroup' => $servicegroup->servicegroup, array(
'sort' => 'service_severity' 'service_state' => 2,
) 'service_handled' => 1,
); ?>" title="Services CRITICAL Unhandled"> 'servicegroup' => $servicegroup->servicegroup,
<?= $servicegroup->services_critical_unhandled ?> Unhandled 'sort' => 'service_severity'
</a> )
<?php endif ?> ); ?>" title="Services CRITICAL Handled">
</div> <?= $servicegroup->services_critical_handled . ' ' . ($servicegroup->services_critical_unhandled ? $this->translate('Acknowledged') : 'CRITICAL'); ?>
<!-- End of Services CRITICAL --> </a>
<?php endif ?> <?php endif ?>
<?php if ($servicegroup->services_warning): ?> </div>
<!-- Services WARNING --> <!-- End of Services CRITICAL -->
<div class="box entry state_warning <?= $servicegroup->services_warning_unhandled ? '' : 'handled'; ?>"> <?php endif ?>
<a href="<?= $this->href( <?php if ($servicegroup->services_warning_handled || $servicegroup->services_warning_unhandled): ?>
'monitoring/list/services', <!-- Services WARNING -->
array( <div class="box entry state_warning <?= $servicegroup->services_warning_unhandled ? '' : 'handled'; ?>">
'service_state' => 1, <?php if ($servicegroup->services_warning_unhandled): ?>
'servicegroup' => $servicegroup->servicegroup <a href="<?= $this->href(
) 'monitoring/list/services',
); ?>" title="Services WARNING"> array(
<?= $servicegroup->services_warning ?> WARNING 'service_state' => 1,
</a> 'service_acknowledged' => 0,
<?php if ($servicegroup->services_warning_unhandled): ?> 'service_in_downtime' => 0,
<a href="<?= $this->href( 'host_problem' => 0,
'monitoring/list/services', 'servicegroup' => $servicegroup->servicegroup,
array( 'sort' => 'service_severity'
'service_state' => 1, )
'service_unhandled' => 1, ); ?>" title="Services WARNING Unhandled">
'servicegroup' => $servicegroup->servicegroup <?= $servicegroup->services_warning_unhandled; ?> WARNING
) </a>
); ?>" title="Services WARNING Unhandled"> <?php endif ?>
<?= $servicegroup->services_warning_unhandled ?> Unhandled <?php if ($servicegroup->services_warning_handled): ?>
</a> <a href="<?= $this->href(
<?php endif ?> 'monitoring/list/services',
</div> array(
<!-- End of Services WARNING --> 'service_state' => 1,
<?php endif ?> 'service_handled' => 1,
<?php if ($servicegroup->services_unknown): ?> 'servicegroup' => $servicegroup->servicegroup,
<!-- Services UNKNOWN --> 'sort' => 'service_severity'
<div class="box entry state_unknown"> )
<a href="<?= $this->href( ); ?>" title="Services WARNING Handled">
'monitoring/list/services', <?= $servicegroup->services_warning_handled . ' ' . ($servicegroup->services_warning_unhandled ? $this->translate('Acknowledged') : 'WARNING'); ?>
array( </a>
'service_state' => 3, <?php endif ?>
'servicegroup' => $servicegroup->servicegroup </div>
) <!-- End of Services WARNING -->
); ?>" title="Services UNKNOWN"> <?php endif ?>
<?= $servicegroup->services_unknown ?> UNKNOWN <?php if ($servicegroup->services_unknown_handled || $servicegroup->services_unknown_unhandled): ?>
</a> <!-- Services UNKNOWN -->
<?php if ($servicegroup->services_unknown_unhandled): ?> <div class="box entry state_unknown <?= $servicegroup->services_unknown_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href( <?php if ($servicegroup->services_unknown_unhandled): ?>
'monitoring/list/services', <a href="<?= $this->href(
array( 'monitoring/list/services',
'service_state' => 3, array(
'service_unhandled' => 1, 'service_state' => 3,
'servicegroup' => $servicegroup->servicegroup 'service_acknowledged' => 0,
) 'service_in_downtime' => 0,
); ?>" title="Services UNKNOWN Unhandled"> 'host_problem' => 0,
<?= $servicegroup->services_unknown_unhandled ?> Unhandled 'servicegroup' => $servicegroup->servicegroup,
</a> 'sort' => 'service_severity'
<?php endif ?> )
</div> ); ?>" title="Services UNKNOWN Unhandled">
<!-- End of Services UNKNOWN --> <?= $servicegroup->services_unknown_unhandled; ?> UNKNOWN
<?php endif ?> </a>
<?php if ($servicegroup->services_ok): ?> <?php endif ?>
<!-- Services OK --> <?php if ($servicegroup->services_unknown_handled): ?>
<div class="box entry state_ok"> <a href="<?= $this->href(
<a href="<?= $this->href( 'monitoring/list/services',
'monitoring/list/services', array(
array( 'service_state' => 3,
'service_state' => 0, 'service_handled' => 1,
'servicegroup' => $servicegroup->servicegroup 'servicegroup' => $servicegroup->servicegroup,
) 'sort' => 'service_severity'
); ?>" title="Services OK"> )
<?= $servicegroup->services_ok ?> OK ); ?>" title="Services UNKNOWN Handled">
</a> <?= $servicegroup->services_unknown_handled . ' ' . ($servicegroup->services_unknown_unhandled ? $this->translate('Acknowledged') : 'UNKNOWN'); ?>
</div> </a>
<!-- End of Services OK --> <?php endif ?>
<?php endif ?> </div>
<?php if ($servicegroup->services_pending): ?> <!-- End of Services UNKNOWN -->
<!-- Services PENDING --> <?php endif ?>
<div class="box entry state_pending"> <?php if ($servicegroup->services_ok): ?>
<a href="<?= $this->href( <!-- Services OK -->
'monitoring/list/services', <div class="box entry state_ok">
array( <a href="<?= $this->href(
'service_state' => 99, 'monitoring/list/services',
'servicegroup' => $servicegroup->servicegroup array(
) 'service_state' => 0,
); ?>" title="Services PENDING"> 'servicegroup' => $servicegroup->servicegroup,
<?= $servicegroup->services_pending ?> PENDING 'sort' => 'service_severity'
</a> )
</div> ); ?>" title="Services OK">
<!-- End of Services PENDING --> <?= $servicegroup->services_ok; ?> OK
<?php endif ?> </a>
</td> </div>
</tr> <!-- End of Services OK -->
</tbody> <?php endif ?>
</table> <?php if ($servicegroup->services_pending): ?>
</div> <!-- Services PENDING -->
<div class="box entry state_pending">
<a href="<?= $this->href(
'monitoring/list/services',
array(
'service_state' => 99,
'servicegroup' => $servicegroup->servicegroup,
'sort' => 'service_severity'
)
); ?>" title="Services PENDING">
<?= $servicegroup->services_pending; ?> PENDING
</a>
</div>
<!-- End of Services PENDING -->
<?php endif ?>
</td>
</tr>
</tbody>
</table>
</div> </div>
<?php endforeach; ?> </div>
<?php endforeach; ?>
</div> </div>
</div> </div>

View File

@ -90,15 +90,15 @@
'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_ok_hosts, 'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_ok_hosts,
'services_pending' => $this->statusSummary->services_pending_on_ok_hosts, 'services_pending' => $this->statusSummary->services_pending_on_ok_hosts,
'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_ok_hosts, 'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_ok_hosts,
'services_warning' => $this->statusSummary->services_warning_on_ok_hosts, 'services_warning_handled' => $this->statusSummary->services_warning_handled_on_ok_hosts,
'services_warning_unhandled' => $this->statusSummary->services_warning_unhandled_on_ok_hosts, 'services_warning_unhandled' => $this->statusSummary->services_warning_unhandled_on_ok_hosts,
'services_warning_passive' => $this->statusSummary->services_warning_passive_on_ok_hosts, 'services_warning_passive' => $this->statusSummary->services_warning_passive_on_ok_hosts,
'services_warning_not_checked' => $this->statusSummary->services_warning_not_checked_on_ok_hosts, 'services_warning_not_checked' => $this->statusSummary->services_warning_not_checked_on_ok_hosts,
'services_critical' => $this->statusSummary->services_critical_on_ok_hosts, 'services_critical_handled' => $this->statusSummary->services_critical_handled_on_ok_hosts,
'services_critical_unhandled' => $this->statusSummary->services_critical_unhandled_on_ok_hosts, 'services_critical_unhandled' => $this->statusSummary->services_critical_unhandled_on_ok_hosts,
'services_critical_passive' => $this->statusSummary->services_critical_passive_on_ok_hosts, 'services_critical_passive' => $this->statusSummary->services_critical_passive_on_ok_hosts,
'services_critical_not_checked' => $this->statusSummary->services_critical_not_checked_on_ok_hosts, 'services_critical_not_checked' => $this->statusSummary->services_critical_not_checked_on_ok_hosts,
'services_unknown' => $this->statusSummary->services_unknown_on_ok_hosts, 'services_unknown_handled' => $this->statusSummary->services_unknown_handled_on_ok_hosts,
'services_unknown_unhandled' => $this->statusSummary->services_unknown_unhandled_on_ok_hosts, 'services_unknown_unhandled' => $this->statusSummary->services_unknown_unhandled_on_ok_hosts,
'services_unknown_passive' => $this->statusSummary->services_unknown_passive_on_ok_hosts, 'services_unknown_passive' => $this->statusSummary->services_unknown_passive_on_ok_hosts,
'services_unknown_not_checked' => $this->statusSummary->services_unknown_not_checked_on_ok_hosts 'services_unknown_not_checked' => $this->statusSummary->services_unknown_not_checked_on_ok_hosts

View File

@ -1,17 +1,19 @@
<?php if ($services_critical): ?> <?php if ($services_critical_handled || $services_critical_unhandled): ?>
<div class="box entry state_critical <?= $services_critical_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_critical <?= $services_critical_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 2)
); ?>">
<?= $services_critical; ?> CRITICAL
</a>
<?php if ($services_critical_unhandled): ?> <?php if ($services_critical_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/services', 'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 2, 'service_handled' => 0) array('host_problem' => $host_problem, 'service_state' => 2, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
); ?>"> ); ?>">
<?= $services_critical_unhandled . ' ' . $this->translate('Unhandled'); ?> <?= $services_critical_unhandled; ?> CRITICAL
</a>
<?php endif ?>
<?php if ($services_critical_handled): ?>
<a href="<?= $this->href(
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 2, 'service_handled' => 1)
); ?>">
<?= $services_critical_handled . ' ' . ($services_critical_unhandled ? $this->translate('Acknowledged') : 'CRITICAL'); ?>
</a> </a>
<?php endif ?> <?php endif ?>
<?php if ($services_critical_passive): ?> <?php if ($services_critical_passive): ?>
@ -66,20 +68,22 @@
<?php endif ?> <?php endif ?>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if ($services_warning): ?> <?php if ($services_warning_handled || $services_warning_unhandled): ?>
<div class="box entry state_warning <?= $services_warning_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_warning <?= $services_warning_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 1)
); ?>">
<?= $services_warning; ?> WARNING
</a>
<?php if ($services_warning_unhandled): ?> <?php if ($services_warning_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/services', 'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 1, 'service_handled' => 0) array('host_problem' => $host_problem, 'service_state' => 1, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
); ?>"> ); ?>">
<?= $services_warning_unhandled . ' ' . $this->translate('Unhandled'); ?> <?= $services_warning_unhandled; ?> WARNING
</a>
<?php endif ?>
<?php if ($services_warning_handled): ?>
<a href="<?= $this->href(
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 1, 'service_handled' => 1)
); ?>">
<?= $services_warning_handled . ' ' . ($services_warning_unhandled ? $this->translate('Acknowledged') : 'WARNING'); ?>
</a> </a>
<?php endif ?> <?php endif ?>
<?php if ($services_warning_passive): ?> <?php if ($services_warning_passive): ?>
@ -134,20 +138,22 @@
<?php endif ?> <?php endif ?>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if ($services_unknown): ?> <?php if ($services_unknown_handled || $services_unknown_unhandled): ?>
<div class="box entry state_unknown <?= $services_unknown_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_unknown <?= $services_unknown_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 3)
); ?>">
<?= $services_unknown; ?> UNKNOWN
</a>
<?php if ($services_unknown_unhandled): ?> <?php if ($services_unknown_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/services', 'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 3, 'service_handled' => 0) array('host_problem' => $host_problem, 'service_state' => 3, 'service_acknowledged' => 0, 'service_in_downtime' => 0)
); ?>"> ); ?>">
<?= $services_unknown_unhandled . ' ' . $this->translate('Unhandled'); ?> <?= $services_unknown_unhandled; ?> UNKNOWN
</a>
<?php endif ?>
<?php if ($services_unknown_handled): ?>
<a href="<?= $this->href(
'monitoring/list/services',
array('host_problem' => $host_problem, 'service_state' => 3, 'service_handled' => 1)
); ?>">
<?= $services_unknown_handled . ' ' . ($services_unknown_unhandled ? $this->translate('Acknowledged') : 'UNKNOWN'); ?>
</a> </a>
<?php endif ?> <?php endif ?>
<?php if ($services_unknown_passive): ?> <?php if ($services_unknown_passive): ?>

View File

@ -11,20 +11,22 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<?php if ($this->statusSummary->hosts_down): ?> <?php if ($this->statusSummary->hosts_down_handled || $this->statusSummary->hosts_down_unhandled): ?>
<div class="box entry state_down <?= $this->statusSummary->hosts_down_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_down <?= $this->statusSummary->hosts_down_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/hosts',
array('host_state' => 1)
); ?>">
<?= $this->statusSummary->hosts_down; ?> DOWN
</a>
<?php if ($this->statusSummary->hosts_down_unhandled): ?> <?php if ($this->statusSummary->hosts_down_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/hosts', 'monitoring/list/hosts',
array('host_state' => 1, 'host_unhandled' => 1) array('host_state' => 1, 'host_unhandled' => 1)
); ?>"> ); ?>">
<?= $this->statusSummary->hosts_down_unhandled . ' ' . $this->translate('Unhandled'); ?> <?= $this->statusSummary->hosts_down_unhandled; ?> DOWN
</a>
<?php endif ?>
<?php if ($this->statusSummary->hosts_down_handled): ?>
<a href="<?= $this->href(
'monitoring/list/hosts',
array('host_state' => 1, 'host_handled' => 1)
); ?>">
<?= $this->statusSummary->hosts_down_handled . ' ' . $this->statusSummary->hosts_down_unhandled ? $this->translate('Acknowledged') : 'DOWN'; ?>
</a> </a>
<?php endif ?> <?php endif ?>
<?php if ($this->statusSummary->hosts_down_passive): ?> <?php if ($this->statusSummary->hosts_down_passive): ?>
@ -77,20 +79,22 @@
<?php endif ?> <?php endif ?>
</div> </div>
<?php endif ?> <?php endif ?>
<?php if ($this->statusSummary->hosts_unreachable): ?> <?php if ($this->statusSummary->hosts_unreachable_handled || $this->statusSummary->hosts_unreachable_unhandled): ?>
<div class="box entry state_unreachable <?= $this->statusSummary->hosts_unreachable_unhandled ? '' : 'handled'; ?>"> <div class="box entry state_unreachable <?= $this->statusSummary->hosts_unreachable_unhandled ? '' : 'handled'; ?>">
<a href="<?= $this->href(
'monitoring/list/hosts',
array('host_state' => 2)
); ?>">
<?= $this->statusSummary->hosts_unreachable; ?> UNREACHABLE
</a>
<?php if ($this->statusSummary->hosts_unreachable_unhandled): ?> <?php if ($this->statusSummary->hosts_unreachable_unhandled): ?>
<a href="<?= $this->href( <a href="<?= $this->href(
'monitoring/list/hosts', 'monitoring/list/hosts',
array('host_state' => 2, 'host_unhandled' => 1) array('host_state' => 2, 'host_unhandled' => 1)
); ?>"> ); ?>">
<?= $this->statusSummary->hosts_unreachable_unhandled . ' ' . $this->translate('Unhandled'); ?> <?= $this->statusSummary->hosts_unreachable_unhandled; ?> UNREACHABLE
</a>
<?php endif ?>
<?php if ($this->statusSummary->hosts_unreachable_handled): ?>
<a href="<?= $this->href(
'monitoring/list/hosts',
array('host_state' => 2, 'host_handled' => 1)
); ?>">
<?= $this->statusSummary->hosts_unreachable . ' ' . $this->statusSummary->hosts_unreachable_unhandled ? $this->translate('Acknowledged') : 'UNREACHABLE'; ?>
</a> </a>
<?php endif ?> <?php endif ?>
<?php if ($this->statusSummary->hosts_unreachable_passive): ?> <?php if ($this->statusSummary->hosts_unreachable_passive): ?>
@ -153,15 +157,15 @@
'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_problem_hosts, 'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_problem_hosts,
'services_pending' => $this->statusSummary->services_pending_on_problem_hosts, 'services_pending' => $this->statusSummary->services_pending_on_problem_hosts,
'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_problem_hosts, 'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_problem_hosts,
'services_warning' => $this->statusSummary->services_warning_on_problem_hosts, 'services_warning_handled' => $this->statusSummary->services_warning_handled_on_problem_hosts,
'services_warning_unhandled' => $this->statusSummary->services_warning_unhandled_on_problem_hosts, 'services_warning_unhandled' => $this->statusSummary->services_warning_unhandled_on_problem_hosts,
'services_warning_passive' => $this->statusSummary->services_warning_passive_on_problem_hosts, 'services_warning_passive' => $this->statusSummary->services_warning_passive_on_problem_hosts,
'services_warning_not_checked' => $this->statusSummary->services_warning_not_checked_on_problem_hosts, 'services_warning_not_checked' => $this->statusSummary->services_warning_not_checked_on_problem_hosts,
'services_critical' => $this->statusSummary->services_critical_on_problem_hosts, 'services_critical_handled' => $this->statusSummary->services_critical_handled_on_problem_hosts,
'services_critical_unhandled' => $this->statusSummary->services_critical_unhandled_on_problem_hosts, 'services_critical_unhandled' => $this->statusSummary->services_critical_unhandled_on_problem_hosts,
'services_critical_passive' => $this->statusSummary->services_critical_passive_on_problem_hosts, 'services_critical_passive' => $this->statusSummary->services_critical_passive_on_problem_hosts,
'services_critical_not_checked' => $this->statusSummary->services_critical_not_checked_on_problem_hosts, 'services_critical_not_checked' => $this->statusSummary->services_critical_not_checked_on_problem_hosts,
'services_unknown' => $this->statusSummary->services_unknown_on_problem_hosts, 'services_unknown_handled' => $this->statusSummary->services_unknown_handled_on_problem_hosts,
'services_unknown_unhandled' => $this->statusSummary->services_unknown_unhandled_on_problem_hosts, 'services_unknown_unhandled' => $this->statusSummary->services_unknown_unhandled_on_problem_hosts,
'services_unknown_passive' => $this->statusSummary->services_unknown_passive_on_problem_hosts, 'services_unknown_passive' => $this->statusSummary->services_unknown_passive_on_problem_hosts,
'services_unknown_not_checked' => $this->statusSummary->services_unknown_not_checked_on_problem_hosts 'services_unknown_not_checked' => $this->statusSummary->services_unknown_not_checked_on_problem_hosts

View File

@ -7,6 +7,7 @@
<div class="boxview" data-base-target="col2"> <div class="boxview" data-base-target="col2">
<?= $this->render('tactical/components/problem_hosts.phtml'); ?> <?= $this->render('tactical/components/problem_hosts.phtml'); ?>
<?= $this->render('tactical/components/ok_hosts.phtml'); ?> <?= $this->render('tactical/components/ok_hosts.phtml'); ?>
<br />
<?= $this->render('tactical/components/hostservicechecks.phtml'); ?> <?= $this->render('tactical/components/hostservicechecks.phtml'); ?>
<?= $this->render('tactical/components/monitoringfeatures.phtml'); ?> <?= $this->render('tactical/components/monitoringfeatures.phtml'); ?>
</div> </div>

View File

@ -91,15 +91,15 @@ class StatusSummaryQuery extends IdoQuery
'services_ok_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 0 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_ok_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 0 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
'services_pending_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 99 THEN 1 ELSE 0 END)', 'services_pending_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 99 THEN 1 ELSE 0 END)',
'services_pending_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 99 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_pending_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 99 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
'services_warning_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 1 THEN 1 ELSE 0 END)', 'services_warning_handled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 1 AND acknowledged + in_downtime > 0 THEN 1 ELSE 0 END)',
'services_warning_unhandled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 1 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)', 'services_warning_unhandled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 1 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
'services_warning_passive_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 1 AND is_passive_checked = 1 THEN 1 ELSE 0 END)', 'services_warning_passive_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 1 AND is_passive_checked = 1 THEN 1 ELSE 0 END)',
'services_warning_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 1 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_warning_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 1 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
'services_critical_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 2 THEN 1 ELSE 0 END)', 'services_critical_handled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 2 AND acknowledged + in_downtime > 0 THEN 1 ELSE 0 END)',
'services_critical_unhandled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 2 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)', 'services_critical_unhandled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 2 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
'services_critical_passive_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 2 AND is_passive_checked = 1 THEN 1 ELSE 0 END)', 'services_critical_passive_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 2 AND is_passive_checked = 1 THEN 1 ELSE 0 END)',
'services_critical_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 2 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_critical_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 2 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
'services_unknown_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 3 THEN 1 ELSE 0 END)', 'services_unknown_handled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 3 AND acknowledged + in_downtime > 0 THEN 1 ELSE 0 END)',
'services_unknown_unhandled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 3 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)', 'services_unknown_unhandled_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 3 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
'services_unknown_passive_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 3 AND is_passive_checked = 1 THEN 1 ELSE 0 END)', 'services_unknown_passive_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 3 AND is_passive_checked = 1 THEN 1 ELSE 0 END)',
'services_unknown_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 3 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_unknown_not_checked_on_ok_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 0 OR host_state = 99) AND state = 3 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
@ -107,15 +107,15 @@ class StatusSummaryQuery extends IdoQuery
'services_ok_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 0 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_ok_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 0 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
'services_pending_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 99 THEN 1 ELSE 0 END)', 'services_pending_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 99 THEN 1 ELSE 0 END)',
'services_pending_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 99 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_pending_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 99 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
'services_warning_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 1 THEN 1 ELSE 0 END)', 'services_warning_handled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 1 AND acknowledged + in_downtime > 0 THEN 1 ELSE 0 END)',
'services_warning_unhandled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 1 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)', 'services_warning_unhandled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 1 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
'services_warning_passive_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 1 AND is_passive_checked = 1 THEN 1 ELSE 0 END)', 'services_warning_passive_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 1 AND is_passive_checked = 1 THEN 1 ELSE 0 END)',
'services_warning_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 1 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_warning_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 1 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
'services_critical_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 2 THEN 1 ELSE 0 END)', 'services_critical_handled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 2 AND acknowledged + in_downtime > 0 THEN 1 ELSE 0 END)',
'services_critical_unhandled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 2 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)', 'services_critical_unhandled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 2 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
'services_critical_passive_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 2 AND is_passive_checked = 1 THEN 1 ELSE 0 END)', 'services_critical_passive_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 2 AND is_passive_checked = 1 THEN 1 ELSE 0 END)',
'services_critical_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 2 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)', 'services_critical_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 2 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)',
'services_unknown_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 3 THEN 1 ELSE 0 END)', 'services_unknown_handled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 3 AND acknowledged + in_downtime > 0 THEN 1 ELSE 0 END)',
'services_unknown_unhandled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 3 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)', 'services_unknown_unhandled_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 3 AND acknowledged + in_downtime = 0 THEN 1 ELSE 0 END)',
'services_unknown_passive_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 3 AND is_passive_checked = 1 THEN 1 ELSE 0 END)', 'services_unknown_passive_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 3 AND is_passive_checked = 1 THEN 1 ELSE 0 END)',
'services_unknown_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 3 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)' 'services_unknown_not_checked_on_problem_hosts' => 'SUM(CASE WHEN object_type = \'service\' AND (host_state = 1 OR host_state = 2) AND state = 3 AND is_active_checked = 0 AND is_passive_checked = 0 THEN 1 ELSE 0 END)'

View File

@ -44,6 +44,7 @@ class ServiceStatus extends DataView
'host_state_type', 'host_state_type',
'host_last_state_change', 'host_last_state_change',
'host_address', 'host_address',
'host_problem',
'host_handled', 'host_handled',
'service_description', 'service_description',
'service_display_name', 'service_display_name',

View File

@ -92,15 +92,15 @@ class StatusSummary extends DataView
'services_ok_not_checked_on_ok_hosts', 'services_ok_not_checked_on_ok_hosts',
'services_pending_on_ok_hosts', 'services_pending_on_ok_hosts',
'services_pending_not_checked_on_ok_hosts', 'services_pending_not_checked_on_ok_hosts',
'services_warning_on_ok_hosts', 'services_warning_handled_on_ok_hosts',
'services_warning_unhandled_on_ok_hosts', 'services_warning_unhandled_on_ok_hosts',
'services_warning_passive_on_ok_hosts', 'services_warning_passive_on_ok_hosts',
'services_warning_not_checked_on_ok_hosts', 'services_warning_not_checked_on_ok_hosts',
'services_critical_on_ok_hosts', 'services_critical_handled_on_ok_hosts',
'services_critical_unhandled_on_ok_hosts', 'services_critical_unhandled_on_ok_hosts',
'services_critical_passive_on_ok_hosts', 'services_critical_passive_on_ok_hosts',
'services_critical_not_checked_on_ok_hosts', 'services_critical_not_checked_on_ok_hosts',
'services_unknown_on_ok_hosts', 'services_unknown_handled_on_ok_hosts',
'services_unknown_unhandled_on_ok_hosts', 'services_unknown_unhandled_on_ok_hosts',
'services_unknown_passive_on_ok_hosts', 'services_unknown_passive_on_ok_hosts',
'services_unknown_not_checked_on_ok_hosts', 'services_unknown_not_checked_on_ok_hosts',
@ -108,15 +108,15 @@ class StatusSummary extends DataView
'services_ok_not_checked_on_problem_hosts', 'services_ok_not_checked_on_problem_hosts',
'services_pending_on_problem_hosts', 'services_pending_on_problem_hosts',
'services_pending_not_checked_on_problem_hosts', 'services_pending_not_checked_on_problem_hosts',
'services_warning_on_problem_hosts', 'services_warning_handled_on_problem_hosts',
'services_warning_unhandled_on_problem_hosts', 'services_warning_unhandled_on_problem_hosts',
'services_warning_passive_on_problem_hosts', 'services_warning_passive_on_problem_hosts',
'services_warning_not_checked_on_problem_hosts', 'services_warning_not_checked_on_problem_hosts',
'services_critical_on_problem_hosts', 'services_critical_handled_on_problem_hosts',
'services_critical_unhandled_on_problem_hosts', 'services_critical_unhandled_on_problem_hosts',
'services_critical_passive_on_problem_hosts', 'services_critical_passive_on_problem_hosts',
'services_critical_not_checked_on_problem_hosts', 'services_critical_not_checked_on_problem_hosts',
'services_unknown_on_problem_hosts', 'services_unknown_handled_on_problem_hosts',
'services_unknown_unhandled_on_problem_hosts', 'services_unknown_unhandled_on_problem_hosts',
'services_unknown_passive_on_problem_hosts', 'services_unknown_passive_on_problem_hosts',
'services_unknown_not_checked_on_problem_hosts' 'services_unknown_not_checked_on_problem_hosts'