parent
ba45d64891
commit
3e495b6eaf
|
@ -1,17 +1,144 @@
|
|||
<?php
|
||||
// @codingStandardsIgnoreStart
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
// {{{ICINGA_LICENSE_HEADER}}}
|
||||
|
||||
use Icinga\Module\Monitoring\Controller as MonitoringController;
|
||||
use Icinga\Module\Monitoring\DataView\StatusSummary;
|
||||
use Icinga\Chart\PieChart;
|
||||
|
||||
class Monitoring_TacticalController extends MonitoringController
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->statusSummary = StatusSummary::fromRequest($this->_request)->getQuery()->fetchRow();
|
||||
$this->view->statusSummary = StatusSummary::fromRequest(
|
||||
$this->_request,
|
||||
array(
|
||||
'hosts_up',
|
||||
'hosts_up_not_checked',
|
||||
'hosts_pending',
|
||||
'hosts_pending_not_checked',
|
||||
'hosts_down',
|
||||
'hosts_down_handled',
|
||||
'hosts_down_unhandled',
|
||||
'hosts_down_handled_active',
|
||||
'hosts_down_handled_passive',
|
||||
'hosts_down_handled_not_checked',
|
||||
'hosts_down_unhandled_active',
|
||||
'hosts_down_unhandled_passive',
|
||||
'hosts_down_unhandled_not_checked',
|
||||
'hosts_unreachable',
|
||||
'hosts_unreachable_handled',
|
||||
'hosts_unreachable_unhandled',
|
||||
'hosts_unreachable_handled_active',
|
||||
'hosts_unreachable_handled_passive',
|
||||
'hosts_unreachable_handled_not_checked',
|
||||
'hosts_unreachable_unhandled_active',
|
||||
'hosts_unreachable_unhandled_passive',
|
||||
'hosts_unreachable_unhandled_not_checked',
|
||||
|
||||
'services_ok_on_up_hosts',
|
||||
'services_ok_not_checked_on_up_hosts',
|
||||
'services_pending_on_up_hosts',
|
||||
'services_pending_not_checked_on_up_hosts',
|
||||
'services_warning_handled_active_on_up_hosts',
|
||||
'services_warning_handled_passive_on_up_hosts',
|
||||
'services_warning_handled_not_checked_on_up_hosts',
|
||||
'services_warning_unhandled_active_on_up_hosts',
|
||||
'services_warning_unhandled_passive_on_up_hosts',
|
||||
'services_warning_unhandled_not_checked_on_up_hosts',
|
||||
'services_critical_handled_active_on_up_hosts',
|
||||
'services_critical_handled_passive_on_up_hosts',
|
||||
'services_critical_handled_not_checked_on_up_hosts',
|
||||
'services_critical_unhandled_active_on_up_hosts',
|
||||
'services_critical_unhandled_passive_on_up_hosts',
|
||||
'services_critical_unhandled_not_checked_on_up_hosts',
|
||||
'services_unknown_handled_active_on_up_hosts',
|
||||
'services_unknown_handled_passive_on_up_hosts',
|
||||
'services_unknown_handled_not_checked_on_up_hosts',
|
||||
'services_unknown_unhandled_active_on_up_hosts',
|
||||
'services_unknown_unhandled_passive_on_up_hosts',
|
||||
'services_unknown_unhandled_not_checked_on_up_hosts',
|
||||
'services_ok_on_down_hosts',
|
||||
'services_ok_not_checked_on_down_hosts',
|
||||
'services_pending_on_down_hosts',
|
||||
'services_pending_not_checked_on_down_hosts',
|
||||
'services_warning_handled_active_on_down_hosts',
|
||||
'services_warning_handled_passive_on_down_hosts',
|
||||
'services_warning_handled_not_checked_on_down_hosts',
|
||||
'services_warning_unhandled_active_on_down_hosts',
|
||||
'services_warning_unhandled_passive_on_down_hosts',
|
||||
'services_warning_unhandled_not_checked_on_down_hosts',
|
||||
'services_critical_handled_active_on_down_hosts',
|
||||
'services_critical_handled_passive_on_down_hosts',
|
||||
'services_critical_handled_not_checked_on_down_hosts',
|
||||
'services_critical_unhandled_active_on_down_hosts',
|
||||
'services_critical_unhandled_passive_on_down_hosts',
|
||||
'services_critical_unhandled_not_checked_on_down_hosts',
|
||||
'services_unknown_handled_active_on_down_hosts',
|
||||
'services_unknown_handled_passive_on_down_hosts',
|
||||
'services_unknown_handled_not_checked_on_down_hosts',
|
||||
'services_unknown_unhandled_active_on_down_hosts',
|
||||
'services_unknown_unhandled_passive_on_down_hosts',
|
||||
'services_unknown_unhandled_not_checked_on_down_hosts',
|
||||
'services_ok_on_unreachable_hosts',
|
||||
'services_ok_not_checked_on_unreachable_hosts',
|
||||
'services_pending_on_unreachable_hosts',
|
||||
'services_pending_not_checked_on_unreachable_hosts',
|
||||
'services_warning_handled_active_on_unreachable_hosts',
|
||||
'services_warning_handled_passive_on_unreachable_hosts',
|
||||
'services_warning_handled_not_checked_on_unreachable_hosts',
|
||||
'services_warning_unhandled_active_on_unreachable_hosts',
|
||||
'services_warning_unhandled_passive_on_unreachable_hosts',
|
||||
'services_warning_unhandled_not_checked_on_unreachable_hosts',
|
||||
'services_critical_handled_active_on_unreachable_hosts',
|
||||
'services_critical_handled_passive_on_unreachable_hosts',
|
||||
'services_critical_handled_not_checked_on_unreachable_hosts',
|
||||
'services_critical_unhandled_active_on_unreachable_hosts',
|
||||
'services_critical_unhandled_passive_on_unreachable_hosts',
|
||||
'services_critical_unhandled_not_checked_on_unreachable_hosts',
|
||||
'services_unknown_handled_active_on_unreachable_hosts',
|
||||
'services_unknown_handled_passive_on_unreachable_hosts',
|
||||
'services_unknown_handled_not_checked_on_unreachable_hosts',
|
||||
'services_unknown_unhandled_active_on_unreachable_hosts',
|
||||
'services_unknown_unhandled_passive_on_unreachable_hosts',
|
||||
'services_unknown_unhandled_not_checked_on_unreachable_hosts',
|
||||
'services_ok_on_pending_hosts',
|
||||
'services_ok_not_checked_on_pending_hosts',
|
||||
'services_pending_on_pending_hosts',
|
||||
'services_pending_not_checked_on_pending_hosts',
|
||||
'services_warning_handled_active_on_pending_hosts',
|
||||
'services_warning_handled_passive_on_pending_hosts',
|
||||
'services_warning_handled_not_checked_on_pending_hosts',
|
||||
'services_warning_unhandled_active_on_pending_hosts',
|
||||
'services_warning_unhandled_passive_on_pending_hosts',
|
||||
'services_warning_unhandled_not_checked_on_pending_hosts',
|
||||
'services_critical_handled_active_on_pending_hosts',
|
||||
'services_critical_handled_passive_on_pending_hosts',
|
||||
'services_critical_handled_not_checked_on_pending_hosts',
|
||||
'services_critical_unhandled_active_on_pending_hosts',
|
||||
'services_critical_unhandled_passive_on_pending_hosts',
|
||||
'services_critical_unhandled_not_checked_on_pending_hosts',
|
||||
'services_unknown_handled_active_on_pending_hosts',
|
||||
'services_unknown_handled_passive_on_pending_hosts',
|
||||
'services_unknown_handled_not_checked_on_pending_hosts',
|
||||
'services_unknown_unhandled_active_on_pending_hosts',
|
||||
'services_unknown_unhandled_passive_on_pending_hosts',
|
||||
'services_unknown_unhandled_not_checked_on_pending_hosts',
|
||||
|
||||
'hosts_active',
|
||||
'hosts_passive',
|
||||
'hosts_not_checked',
|
||||
'services_active',
|
||||
'services_passive',
|
||||
'services_not_checked',
|
||||
'hosts_processing_event_handlers',
|
||||
'services_processing_event_handlers',
|
||||
'hosts_triggering_notifications',
|
||||
'services_triggering_notifications',
|
||||
'hosts_with_flap_detection',
|
||||
'services_with_flap_detection',
|
||||
'hosts_flapping',
|
||||
'services_flapping'
|
||||
)
|
||||
)->getQuery()->fetchRow();
|
||||
}
|
||||
}
|
||||
// @codingStandardsIgnoreStop
|
|
@ -0,0 +1,76 @@
|
|||
<span class="state">
|
||||
<table>
|
||||
<thead>
|
||||
<th>Host checks</th>
|
||||
<th>Service checks</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<?php if ($this->statusSummary->hosts_active): ?>
|
||||
<span class="state active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_passive): ?>
|
||||
<span class="state passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_not_checked): ?>
|
||||
<span class="state not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_active_checks_enabled' => 0, 'host_passive_checks_enabled' => 0)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($this->statusSummary->services_active): ?>
|
||||
<span class="state active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->services_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->services_passive): ?>
|
||||
<span class="state passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 1)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->services_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->services_not_checked): ?>
|
||||
<span class="state not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_active_checks_enabled' => 0, 'service_passive_checks_enabled' => 0)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->services_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</span>
|
|
@ -0,0 +1,182 @@
|
|||
<?php
|
||||
|
||||
$summary = $this->statusSummary;
|
||||
$total_services = $summary->services_active + $summary->services_passive + $summary->services_not_checked;
|
||||
$total_hosts = $summary->hosts_active + $summary->hosts_passive + $summary->hosts_not_checked;
|
||||
|
||||
$services_without_flap_detection = $total_services - $summary->services_with_flap_detection;
|
||||
$hosts_without_flap_detection = $total_hosts - $summary->hosts_with_flap_detection;
|
||||
$non_flapping_services = $total_services - $summary->services_flapping;
|
||||
$non_flapping_hosts = $total_hosts - $summary->hosts_flapping;
|
||||
$hosts_not_triggering_notifications = $total_hosts - $summary->hosts_triggering_notifications;
|
||||
$services_not_triggering_notifications = $total_services - $summary->services_triggering_notifications;
|
||||
$hosts_not_processing_event_handlers = $total_hosts - $summary->hosts_processing_event_handlers;
|
||||
$services_not_processing_event_handlers = $total_services - $summary->services_processing_event_handlers;
|
||||
|
||||
?>
|
||||
<span class="state">
|
||||
<table>
|
||||
<caption>Monitoring features</caption>
|
||||
<thead>
|
||||
<th>Hosts</th>
|
||||
<th>Services</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="state subtitle">Flap detection</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="state flap_detection">
|
||||
<?php if ($hosts_without_flap_detection): ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_flap_detection_enabled' => 0)
|
||||
); ?>">
|
||||
<?= $hosts_without_flap_detection; ?> hosts disabled
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_flap_detection_enabled' => 1)
|
||||
); ?>">
|
||||
All hosts enabled
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<?php if ($summary->hosts_flapping): ?>
|
||||
<span class="state flap_detection flapping">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_is_flapping' => 1)
|
||||
); ?>">
|
||||
<?= $summary->hosts_flapping; ?> hosts flapping
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="state flap_detection">
|
||||
<?php if ($services_without_flap_detection): ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_flap_detection_enabled' => 0)
|
||||
); ?>">
|
||||
<?= $services_without_flap_detection; ?> services disabled
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_flap_detection_enabled' => 1)
|
||||
); ?>">
|
||||
All services enabled
|
||||
</a>
|
||||
<?php endif ?>
|
||||
<?php if ($summary->services_flapping): ?>
|
||||
<span class="state flap_detection flapping">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_is_flapping' => 1)
|
||||
); ?>">
|
||||
<?= $summary->services_flapping; ?> services flapping
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="state subtitle">Notifications</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="state notifications">
|
||||
<?php if ($hosts_not_triggering_notifications): ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_notifications_enabled' => 0)
|
||||
); ?>">
|
||||
<?= $hosts_not_triggering_notifications; ?> hosts disabled
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_notifications_enabled' => 1)
|
||||
); ?>">
|
||||
All hosts enabled
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="state notifications">
|
||||
<?php if ($services_not_triggering_notifications): ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_notifications_enabled' => 0)
|
||||
); ?>">
|
||||
<?= $services_not_triggering_notifications; ?> hosts disabled
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_notifications_enabled' => 1)
|
||||
); ?>">
|
||||
All services enabled
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<span class="state subtitle">Event handlers</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="state eventhandlers">
|
||||
<?php if ($hosts_not_processing_event_handlers): ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_event_handler_enabled' => 0)
|
||||
); ?>">
|
||||
<?= $hosts_not_processing_event_handlers; ?> hosts disabled
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_event_handler_enabled' => 1)
|
||||
); ?>">
|
||||
All hosts enabled
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="state notifications">
|
||||
<?php if ($services_not_processing_event_handlers): ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_event_handler_enabled' => 0)
|
||||
); ?>">
|
||||
<?= $services_not_processing_event_handlers; ?> hosts disabled
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('service_event_handler_enabled' => 1)
|
||||
); ?>">
|
||||
All services enabled
|
||||
</a>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</span>
|
|
@ -0,0 +1,437 @@
|
|||
<?php
|
||||
|
||||
$services_warning_handled = $services_warning_handled_active + $services_warning_handled_passive + $services_warning_handled_not_checked;
|
||||
$services_warning_unhandled = $services_warning_unhandled_active + $services_warning_unhandled_passive + $services_warning_unhandled_not_checked;
|
||||
$services_critical_handled = $services_critical_handled_active + $services_critical_handled_passive + $services_critical_handled_not_checked;
|
||||
$services_critical_unhandled = $services_critical_unhandled_active + $services_critical_unhandled_passive + $services_critical_unhandled_not_checked;
|
||||
$services_unknown_handled = $services_unknown_handled_active + $services_unknown_handled_passive + $services_unknown_handled_not_checked;
|
||||
$services_unknown_unhandled = $services_unknown_unhandled_active + $services_unknown_unhandled_passive + $services_unknown_unhandled_not_checked;
|
||||
|
||||
$services_warning = $services_warning_handled + $services_warning_unhandled;
|
||||
$services_critical = $services_critical_handled + $services_critical_unhandled;
|
||||
$services_unknown = $services_unknown_handled + $services_unknown_unhandled;
|
||||
|
||||
?>
|
||||
|
||||
<?php if ($services_critical): ?>
|
||||
<span class="state critical">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 2)
|
||||
); ?>">
|
||||
<?= $services_critical; ?> CRITICAL
|
||||
</a>
|
||||
<?php if ($services_critical_unhandled): ?>
|
||||
<span class="state critical unhandled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 2, 'service_handled' => 0)
|
||||
); ?>">
|
||||
<?= $services_critical_unhandled; ?> unhandled
|
||||
</a>
|
||||
<?php if ($services_critical_unhandled_active): ?>
|
||||
<span class="state critical unhandled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_critical_unhandled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_critical_unhandled_passive): ?>
|
||||
<span class="state critical unhandled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_critical_unhandled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_critical_unhandled_not_checked): ?>
|
||||
<span class="state critical unhandled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_critical_unhandled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_critical_handled): ?>
|
||||
<span class="state critical handled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 2, 'service_handled' => 1)
|
||||
); ?>">
|
||||
<?= $services_critical_handled; ?> handled
|
||||
</a>
|
||||
<?php if ($services_critical_handled_active): ?>
|
||||
<span class="state critical handled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_critical_handled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_critical_handled_passive): ?>
|
||||
<span class="state critical handled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_critical_handled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_critical_handled_not_checked): ?>
|
||||
<span class="state critical handled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 2,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_critical_handled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning): ?>
|
||||
<span class="state warning">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 1)
|
||||
); ?>">
|
||||
<?= $services_warning; ?> WARNING
|
||||
</a>
|
||||
<?php if ($services_warning_unhandled): ?>
|
||||
<span class="state warning unhandled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 1, 'service_handled' => 0)
|
||||
); ?>">
|
||||
<?= $services_warning_unhandled; ?> unhandled
|
||||
</a>
|
||||
<?php if ($services_warning_unhandled_active): ?>
|
||||
<span class="state warning unhandled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_warning_unhandled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_unhandled_passive): ?>
|
||||
<span class="state warning unhandled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_warning_unhandled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_unhandled_not_checked): ?>
|
||||
<span class="state warning unhandled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_warning_unhandled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_handled): ?>
|
||||
<span class="state warning handled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 1, 'service_handled' => 1)
|
||||
); ?>">
|
||||
<?= $services_warning_handled; ?> handled
|
||||
</a>
|
||||
<?php if ($services_warning_handled_active): ?>
|
||||
<span class="state warning handled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_warning_handled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_handled_passive): ?>
|
||||
<span class="state warning handled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_warning_handled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_warning_handled_not_checked): ?>
|
||||
<span class="state warning handled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 1,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_warning_handled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown): ?>
|
||||
<span class="state unknown">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 3)
|
||||
); ?>">
|
||||
<?= $services_unknown; ?> UNKNOWN
|
||||
</a>
|
||||
<?php if ($services_unknown_unhandled): ?>
|
||||
<span class="state unknown unhandled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 3, 'service_handled' => 0)
|
||||
); ?>">
|
||||
<?= $services_unknown_unhandled; ?> unhandled
|
||||
</a>
|
||||
<?php if ($services_unknown_unhandled_active): ?>
|
||||
<span class="state unknown unhandled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_unknown_unhandled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_unhandled_passive): ?>
|
||||
<span class="state unknown unhandled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_unknown_unhandled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_unhandled_not_checked): ?>
|
||||
<span class="state unknown unhandled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_unknown_unhandled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_handled): ?>
|
||||
<span class="state unknown handled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 3, 'service_handled' => 1)
|
||||
); ?>">
|
||||
<?= $services_unknown_handled; ?> handled
|
||||
</a>
|
||||
<?php if ($services_unknown_handled_active): ?>
|
||||
<span class="state unknown handled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 1,
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_unknown_handled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_handled_passive): ?>
|
||||
<span class="state unknown handled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_unknown_handled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_unknown_handled_not_checked): ?>
|
||||
<span class="state unknown handled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 3,
|
||||
'service_handled' => 1,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_unknown_handled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_ok): ?>
|
||||
<span class="state ok">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 0)
|
||||
); ?>">
|
||||
<?= $services_ok; ?> OK
|
||||
</a>
|
||||
<?php if ($services_ok_not_checked): ?>
|
||||
<span class="state ok not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 0,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_ok_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($services_pending): ?>
|
||||
<span class="state pending">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array('host_state' => $hostState, 'service_state' => 99)
|
||||
); ?>">
|
||||
<?= $services_pending; ?> PENDING
|
||||
</a>
|
||||
<?php if ($services_pending_not_checked): ?>
|
||||
<span class="state pending not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/services',
|
||||
array(
|
||||
'service_state' => 99,
|
||||
'host_state' => $hostState,
|
||||
'service_active_checks_enabled' => 0,
|
||||
'service_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $services_pending_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
|
@ -0,0 +1,431 @@
|
|||
<span class="state">
|
||||
<table>
|
||||
<caption>Status Summary</caption>
|
||||
<thead>
|
||||
<th>Hosts</th>
|
||||
<th>Services</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($this->statusSummary->hosts_up): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="state up">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 0)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_up; ?> UP
|
||||
</a>
|
||||
<?php if ($this->statusSummary->hosts_up_not_checked): ?>
|
||||
<span class="state up not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 0,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_up_not_checked; ?> disabled
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->partial(
|
||||
'tactical/components/parts/servicestatesummarybyhoststate.phtml',
|
||||
array(
|
||||
'hostState' => 0,
|
||||
'services_ok' => $this->statusSummary->services_ok_on_up_hosts,
|
||||
'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_up_hosts,
|
||||
'services_pending' => $this->statusSummary->services_pending_on_up_hosts,
|
||||
'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_up_hosts,
|
||||
'services_warning_handled_active' => $this->statusSummary->services_warning_handled_active_on_up_hosts,
|
||||
'services_warning_handled_passive' => $this->statusSummary->services_warning_handled_passive_on_up_hosts,
|
||||
'services_warning_handled_not_checked' => $this->statusSummary->services_warning_handled_not_checked_on_up_hosts,
|
||||
'services_warning_unhandled_active' => $this->statusSummary->services_warning_unhandled_active_on_up_hosts,
|
||||
'services_warning_unhandled_passive' => $this->statusSummary->services_warning_unhandled_passive_on_up_hosts,
|
||||
'services_warning_unhandled_not_checked' => $this->statusSummary->services_warning_unhandled_not_checked_on_up_hosts,
|
||||
'services_critical_handled_active' => $this->statusSummary->services_critical_handled_active_on_up_hosts,
|
||||
'services_critical_handled_passive' => $this->statusSummary->services_critical_handled_passive_on_up_hosts,
|
||||
'services_critical_handled_not_checked' => $this->statusSummary->services_critical_handled_not_checked_on_up_hosts,
|
||||
'services_critical_unhandled_active' => $this->statusSummary->services_critical_unhandled_active_on_up_hosts,
|
||||
'services_critical_unhandled_passive' => $this->statusSummary->services_critical_unhandled_passive_on_up_hosts,
|
||||
'services_critical_unhandled_not_checked' => $this->statusSummary->services_critical_unhandled_not_checked_on_up_hosts,
|
||||
'services_unknown_handled_active' => $this->statusSummary->services_unknown_handled_active_on_up_hosts,
|
||||
'services_unknown_handled_passive' => $this->statusSummary->services_unknown_handled_passive_on_up_hosts,
|
||||
'services_unknown_handled_not_checked' => $this->statusSummary->services_unknown_handled_not_checked_on_up_hosts,
|
||||
'services_unknown_unhandled_active' => $this->statusSummary->services_unknown_unhandled_active_on_up_hosts,
|
||||
'services_unknown_unhandled_passive' => $this->statusSummary->services_unknown_unhandled_passive_on_up_hosts,
|
||||
'services_unknown_unhandled_not_checked' => $this->statusSummary->services_unknown_unhandled_not_checked_on_up_hosts
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_pending): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="state pending">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 99)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_pending; ?> PENDING
|
||||
</a>
|
||||
<?php if ($this->statusSummary->hosts_pending_not_checked): ?>
|
||||
<span class="state pending not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 99,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_pending_not_checked; ?> disabled
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->partial(
|
||||
'tactical/components/parts/servicestatesummarybyhoststate.phtml',
|
||||
array(
|
||||
'hostState' => 99,
|
||||
'services_ok' => $this->statusSummary->services_ok_on_pending_hosts,
|
||||
'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_pending_hosts,
|
||||
'services_pending' => $this->statusSummary->services_pending_on_pending_hosts,
|
||||
'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_pending_hosts,
|
||||
'services_warning_handled_active' => $this->statusSummary->services_warning_handled_active_on_pending_hosts,
|
||||
'services_warning_handled_passive' => $this->statusSummary->services_warning_handled_passive_on_pending_hosts,
|
||||
'services_warning_handled_not_checked' => $this->statusSummary->services_warning_handled_not_checked_on_pending_hosts,
|
||||
'services_warning_unhandled_active' => $this->statusSummary->services_warning_unhandled_active_on_pending_hosts,
|
||||
'services_warning_unhandled_passive' => $this->statusSummary->services_warning_unhandled_passive_on_pending_hosts,
|
||||
'services_warning_unhandled_not_checked' => $this->statusSummary->services_warning_unhandled_not_checked_on_pending_hosts,
|
||||
'services_critical_handled_active' => $this->statusSummary->services_critical_handled_active_on_pending_hosts,
|
||||
'services_critical_handled_passive' => $this->statusSummary->services_critical_handled_passive_on_pending_hosts,
|
||||
'services_critical_handled_not_checked' => $this->statusSummary->services_critical_handled_not_checked_on_pending_hosts,
|
||||
'services_critical_unhandled_active' => $this->statusSummary->services_critical_unhandled_active_on_pending_hosts,
|
||||
'services_critical_unhandled_passive' => $this->statusSummary->services_critical_unhandled_passive_on_pending_hosts,
|
||||
'services_critical_unhandled_not_checked' => $this->statusSummary->services_critical_unhandled_not_checked_on_pending_hosts,
|
||||
'services_unknown_handled_active' => $this->statusSummary->services_unknown_handled_active_on_pending_hosts,
|
||||
'services_unknown_handled_passive' => $this->statusSummary->services_unknown_handled_passive_on_pending_hosts,
|
||||
'services_unknown_handled_not_checked' => $this->statusSummary->services_unknown_handled_not_checked_on_pending_hosts,
|
||||
'services_unknown_unhandled_active' => $this->statusSummary->services_unknown_unhandled_active_on_pending_hosts,
|
||||
'services_unknown_unhandled_passive' => $this->statusSummary->services_unknown_unhandled_passive_on_pending_hosts,
|
||||
'services_unknown_unhandled_not_checked' => $this->statusSummary->services_unknown_unhandled_not_checked_on_pending_hosts
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_down): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="state down">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 1)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down; ?> DOWN
|
||||
</a>
|
||||
<?php if ($this->statusSummary->hosts_down_unhandled): ?>
|
||||
<span class="state down unhandled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 1, 'host_handled' => 0)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down_unhandled; ?> unhandled
|
||||
</a>
|
||||
<?php if ($this->statusSummary->hosts_down_unhandled_active): ?>
|
||||
<span class="state down unhandled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 1,
|
||||
'host_handled' => 0,
|
||||
'host_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down_unhandled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_down_unhandled_passive): ?>
|
||||
<span class="state down unhandled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 1,
|
||||
'host_handled' => 0,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down_unhandled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_down_unhandled_not_checked): ?>
|
||||
<span class="state down unhandled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 1,
|
||||
'host_handled' => 0,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down_unhandled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_down_handled): ?>
|
||||
<span class="state down handled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 1, 'host_handled' => 1)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down_handled; ?> handled
|
||||
</a>
|
||||
<?php if ($this->statusSummary->hosts_down_handled_active): ?>
|
||||
<span class="state down handled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 1,
|
||||
'host_handled' => 1,
|
||||
'host_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down_handled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_down_handled_passive): ?>
|
||||
<span class="state down handled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 1,
|
||||
'host_handled' => 1,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down_handled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_down_handled_not_checked): ?>
|
||||
<span class="state down handled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 1,
|
||||
'host_handled' => 1,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_down_handled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->partial(
|
||||
'tactical/components/parts/servicestatesummarybyhoststate.phtml',
|
||||
array(
|
||||
'hostState' => 1,
|
||||
'services_ok' => $this->statusSummary->services_ok_on_down_hosts,
|
||||
'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_down_hosts,
|
||||
'services_pending' => $this->statusSummary->services_pending_on_down_hosts,
|
||||
'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_down_hosts,
|
||||
'services_warning_handled_active' => $this->statusSummary->services_warning_handled_active_on_down_hosts,
|
||||
'services_warning_handled_passive' => $this->statusSummary->services_warning_handled_passive_on_down_hosts,
|
||||
'services_warning_handled_not_checked' => $this->statusSummary->services_warning_handled_not_checked_on_down_hosts,
|
||||
'services_warning_unhandled_active' => $this->statusSummary->services_warning_unhandled_active_on_down_hosts,
|
||||
'services_warning_unhandled_passive' => $this->statusSummary->services_warning_unhandled_passive_on_down_hosts,
|
||||
'services_warning_unhandled_not_checked' => $this->statusSummary->services_warning_unhandled_not_checked_on_down_hosts,
|
||||
'services_critical_handled_active' => $this->statusSummary->services_critical_handled_active_on_down_hosts,
|
||||
'services_critical_handled_passive' => $this->statusSummary->services_critical_handled_passive_on_down_hosts,
|
||||
'services_critical_handled_not_checked' => $this->statusSummary->services_critical_handled_not_checked_on_down_hosts,
|
||||
'services_critical_unhandled_active' => $this->statusSummary->services_critical_unhandled_active_on_down_hosts,
|
||||
'services_critical_unhandled_passive' => $this->statusSummary->services_critical_unhandled_passive_on_down_hosts,
|
||||
'services_critical_unhandled_not_checked' => $this->statusSummary->services_critical_unhandled_not_checked_on_down_hosts,
|
||||
'services_unknown_handled_active' => $this->statusSummary->services_unknown_handled_active_on_down_hosts,
|
||||
'services_unknown_handled_passive' => $this->statusSummary->services_unknown_handled_passive_on_down_hosts,
|
||||
'services_unknown_handled_not_checked' => $this->statusSummary->services_unknown_handled_not_checked_on_down_hosts,
|
||||
'services_unknown_unhandled_active' => $this->statusSummary->services_unknown_unhandled_active_on_down_hosts,
|
||||
'services_unknown_unhandled_passive' => $this->statusSummary->services_unknown_unhandled_passive_on_down_hosts,
|
||||
'services_unknown_unhandled_not_checked' => $this->statusSummary->services_unknown_unhandled_not_checked_on_down_hosts
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_unreachable): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="state unreachable">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 2)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable; ?> UNREACHABLE
|
||||
</a>
|
||||
<?php if ($this->statusSummary->hosts_unreachable_unhandled): ?>
|
||||
<span class="state unreachable unhandled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 2, 'host_handled' => 0)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable_unhandled; ?> unhandled
|
||||
</a>
|
||||
<?php if ($this->statusSummary->hosts_unreachable_unhandled_active): ?>
|
||||
<span class="state unreachable unhandled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 2,
|
||||
'host_handled' => 0,
|
||||
'host_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable_unhandled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_unreachable_unhandled_passive): ?>
|
||||
<span class="state unreachable unhandled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 2,
|
||||
'host_handled' => 0,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable_unhandled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_unreachable_unhandled_not_checked): ?>
|
||||
<span class="state unreachable unhandled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 2,
|
||||
'host_handled' => 0,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable_unhandled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_unreachable_handled): ?>
|
||||
<span class="state unreachable handled">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array('host_state' => 2, 'host_handled' => 1)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable_handled; ?> handled
|
||||
</a>
|
||||
<?php if ($this->statusSummary->hosts_unreachable_handled_active): ?>
|
||||
<span class="state unreachable handled active">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 2,
|
||||
'host_handled' => 1,
|
||||
'host_active_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable_handled_active; ?> Active
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_unreachable_handled_passive): ?>
|
||||
<span class="state unreachable handled passive">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 2,
|
||||
'host_handled' => 1,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 1
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable_handled_passive; ?> Passive
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<?php if ($this->statusSummary->hosts_unreachable_handled_not_checked): ?>
|
||||
<span class="state unreachable handled not_checked">
|
||||
<a href="<?= $this->href(
|
||||
'monitoring/list/hosts',
|
||||
array(
|
||||
'host_state' => 2,
|
||||
'host_handled' => 1,
|
||||
'host_active_checks_enabled' => 0,
|
||||
'host_passive_checks_enabled' => 0
|
||||
)
|
||||
); ?>">
|
||||
<?= $this->statusSummary->hosts_unreachable_handled_not_checked; ?> Not checked
|
||||
</a>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<?= $this->partial(
|
||||
'tactical/components/parts/servicestatesummarybyhoststate.phtml',
|
||||
array(
|
||||
'hostState' => 2,
|
||||
'services_ok' => $this->statusSummary->services_ok_on_unreachable_hosts,
|
||||
'services_ok_not_checked' => $this->statusSummary->services_ok_not_checked_on_unreachable_hosts,
|
||||
'services_pending' => $this->statusSummary->services_pending_on_unreachable_hosts,
|
||||
'services_pending_not_checked' => $this->statusSummary->services_pending_not_checked_on_unreachable_hosts,
|
||||
'services_warning_handled_active' => $this->statusSummary->services_warning_handled_active_on_unreachable_hosts,
|
||||
'services_warning_handled_passive' => $this->statusSummary->services_warning_handled_passive_on_unreachable_hosts,
|
||||
'services_warning_handled_not_checked' => $this->statusSummary->services_warning_handled_not_checked_on_unreachable_hosts,
|
||||
'services_warning_unhandled_active' => $this->statusSummary->services_warning_unhandled_active_on_unreachable_hosts,
|
||||
'services_warning_unhandled_passive' => $this->statusSummary->services_warning_unhandled_passive_on_unreachable_hosts,
|
||||
'services_warning_unhandled_not_checked' => $this->statusSummary->services_warning_unhandled_not_checked_on_unreachable_hosts,
|
||||
'services_critical_handled_active' => $this->statusSummary->services_critical_handled_active_on_unreachable_hosts,
|
||||
'services_critical_handled_passive' => $this->statusSummary->services_critical_handled_passive_on_unreachable_hosts,
|
||||
'services_critical_handled_not_checked' => $this->statusSummary->services_critical_handled_not_checked_on_unreachable_hosts,
|
||||
'services_critical_unhandled_active' => $this->statusSummary->services_critical_unhandled_active_on_unreachable_hosts,
|
||||
'services_critical_unhandled_passive' => $this->statusSummary->services_critical_unhandled_passive_on_unreachable_hosts,
|
||||
'services_critical_unhandled_not_checked' => $this->statusSummary->services_critical_unhandled_not_checked_on_unreachable_hosts,
|
||||
'services_unknown_handled_active' => $this->statusSummary->services_unknown_handled_active_on_unreachable_hosts,
|
||||
'services_unknown_handled_passive' => $this->statusSummary->services_unknown_handled_passive_on_unreachable_hosts,
|
||||
'services_unknown_handled_not_checked' => $this->statusSummary->services_unknown_handled_not_checked_on_unreachable_hosts,
|
||||
'services_unknown_unhandled_active' => $this->statusSummary->services_unknown_unhandled_active_on_unreachable_hosts,
|
||||
'services_unknown_unhandled_passive' => $this->statusSummary->services_unknown_unhandled_passive_on_unreachable_hosts,
|
||||
'services_unknown_unhandled_not_checked' => $this->statusSummary->services_unknown_unhandled_not_checked_on_unreachable_hosts
|
||||
)
|
||||
); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</span>
|
|
@ -1,120 +1,7 @@
|
|||
<?php
|
||||
$summary = $this->statusSummary;
|
||||
$state = array(
|
||||
'host' => array(
|
||||
'up' => 0,
|
||||
'down' => 1,
|
||||
'unreachable' => 2,
|
||||
'pending' => 99
|
||||
),
|
||||
'service' => array(
|
||||
'ok' => 0,
|
||||
'warning' => 1,
|
||||
'critical' => 2,
|
||||
'unknown' => 3,
|
||||
'pending' => 99
|
||||
)
|
||||
);
|
||||
function init_upper($string) {
|
||||
return mb_strtoupper(substr($string, 0, 1)) . substr($string, 1);
|
||||
}
|
||||
$tacticalTables = array();
|
||||
foreach (array(
|
||||
'host' => array('up', 'down', 'unreachable', 'pending'),
|
||||
'service' => array('ok', 'critical', 'warning', 'unknown', 'pending')
|
||||
) as $key => $value) {
|
||||
$tacticalTables[$key] = array();
|
||||
foreach ($value as $valueState) {
|
||||
$tacticalTables[$key][$valueState] = array();
|
||||
$value_2_ref = $key . 's_' . $valueState;
|
||||
$tacticalTables[$key][$valueState][$valueState] = (int)$summary->{$value_2_ref};
|
||||
foreach (array('disabled', 'unhandled', 'on_problem_hosts') as $value_3) {
|
||||
$value_3_ref = $value_2_ref . '_' . $value_3;
|
||||
if (isset($summary->{$value_3_ref})) {
|
||||
$tacticalTables[$key][$valueState][$value_3] = (int)$summary->{$value_3_ref};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($tacticalTables as $key => $value) {
|
||||
printf(
|
||||
'<table class="tacticalTable"><tr><td colspan="%d"><h1>%ss</h1></td></tr><tr>',
|
||||
count($value),
|
||||
init_upper($key)
|
||||
);
|
||||
foreach ($value as $keyState => $valueState) {
|
||||
printf(
|
||||
'<td class="topbar-status-%s"><a style="font-weight: bold; color: black" href="%s" title="%ss %s">%s: %d</a>',
|
||||
$keyState,
|
||||
$this->href(
|
||||
'monitoring/list/' . $key . 's',
|
||||
array($key . '_state' => $state[$key][$keyState])
|
||||
),
|
||||
init_upper($key),
|
||||
$keyState,
|
||||
init_upper($keyState),
|
||||
$valueState[$keyState]
|
||||
);
|
||||
foreach ($valueState as $keyStateDetail => $valueStateDetail) {
|
||||
if ($keyStateDetail !== $keyState && $valueStateDetail !== 0) {
|
||||
$strReplaced = str_replace('_', ' ', $keyStateDetail);
|
||||
printf(
|
||||
'<br /><a href="%s" title="%ss %s %s"%s>%s: %d</a>',
|
||||
$this->href(
|
||||
'monitoring/list/' . $key . 's',
|
||||
array(
|
||||
$key . '_state' => $state[$key][$keyState],
|
||||
$key . '_' . $keyStateDetail => 1
|
||||
)
|
||||
),
|
||||
init_upper($key),
|
||||
$keyState,
|
||||
$strReplaced,
|
||||
($strReplaced === 'unhandled' ? '' : ' style="color: #f5a9a9"'),
|
||||
$strReplaced,
|
||||
$valueStateDetail
|
||||
);
|
||||
}
|
||||
}
|
||||
echo '</td>';
|
||||
}
|
||||
echo '</tr></table>';
|
||||
}
|
||||
?>
|
||||
<table class="tacticalTable">
|
||||
<tr>
|
||||
<td colspan="2"><h1>Host Checks</h1></td>
|
||||
<td colspan="2"><h1>Service Checks</h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Active</td><td>Passive</td>
|
||||
<td>Active</td><td>Passive</td>
|
||||
</tr>
|
||||
<?php
|
||||
foreach (array(true, false) as $check_enabled) {
|
||||
echo '<tr>';
|
||||
foreach (array('host', 'service') as $hst_srv) {
|
||||
foreach (array('act', 'pass') as $act_pass) {
|
||||
$var_ref = $this->statusSummary->{sprintf(
|
||||
'%ss%s_%sive_checked',
|
||||
$hst_srv,
|
||||
($check_enabled ? '' : '_not'),
|
||||
$act_pass
|
||||
)};
|
||||
if ($var_ref === '0') {
|
||||
echo '<td>';
|
||||
} else {
|
||||
printf(
|
||||
'<td class="topbar-status-%s">%sabled: %s',
|
||||
($check_enabled ? 'up' : 'down'),
|
||||
($check_enabled ? 'en' : 'dis'),
|
||||
$var_ref
|
||||
);
|
||||
}
|
||||
echo '</td>';
|
||||
}
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<div class="content">
|
||||
<div class="summary" data-base-target="col2">
|
||||
<?= $this->render('tactical/components/hostservicechecks.phtml'); ?>
|
||||
<?= $this->render('tactical/components/monitoringfeatures.phtml'); ?>
|
||||
<?= $this->render('tactical/components/statussummary.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue