icingaweb2/modules/monitoring/application/views/scripts/process/performance.phtml

185 lines
5.8 KiB
PHTML
Raw Normal View History

<?php
$rv = $this->runtimevariables;
$ps = $this->programstatus;
$cp = $this->checkPerformance()->create($this->checkperformance);
?>
<h1>Process Information</h1>
<hr />
<div class="panel panel-default">
<div class="panel-body">
Backend <strong><?= $this->backendName; ?></strong> is
<?= $ps->is_currently_running === '1' ? 'running' : 'not running'; ?>
(pid <?= $ps->process_id; ?>)
since <?= $this->timeSince($ps->program_start_time); ?> ago
(<?= $this->dateFormat()->formatDateTime($ps->program_start_time); ?>).
</div>
</div>
<?php if ($ps->disable_notif_expire_time): ?>
<div class="alert alert-warning">
<h4>Notifications disabled with expiration time</h4>
<p>
Notifications automatically turned on again on the
<strong><?= $this->dateFormat()->formatDateTime($ps->disable_notif_expire_time); ?></strong>
</p>
</div>
<?php endif; ?>
<div class="row">
<div class="col-md-7">
<h4>Object summaries</h4>
<table class="table-bordered table">
<thead>
<tr>
<td style="width: 300px;">&nbsp;</td>
<td># overall / scheduled</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<strong>Hosts</strong>
</td>
<td>
<?= $rv->total_hosts; ?>
/ <?= $rv->total_scheduled_hosts; ?>
</td>
</tr>
<tr>
<td>
<strong>Services</strong>
</td>
<td>
<?= $rv->total_services; ?>
/ <?= $rv->total_scheduled_services; ?>
</td>
</tr>
<tr>
<td>
<strong>Average services per host</strong>
</td>
<td>
<?= sprintf('%.2f', $rv->average_services_per_host); ?>
/ <?= sprintf('%.2f', $rv->average_scheduled_services_per_host); ?>
</td>
</tr>
</tbody>
</table>
<h4>Active checks</h4>
<table class="table-bordered table">
<thead>
<tr>
<td style="width: 300px;">&nbsp;</td>
<td>#</td>
<td>Latency</td>
<td>Execution time</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<strong>Host Checks</strong>
</td>
<td><?= $cp->host_active_count; ?></td>
<td><?= sprintf('%.3f', $cp->host_active_latency_avg); ?>s</td>
<td><?= sprintf('%.3f', $cp->host_active_execution_avg); ?>s</td>
</tr>
<tr>
<td>
<strong>Service Checks</strong>
</td>
<td><?= $cp->service_active_count; ?></td>
<td><?= sprintf('%.3f', $cp->service_active_latency_avg); ?>s</td>
<td><?= sprintf('%.3f', $cp->service_active_execution_avg); ?>s</td>
</tr>
</tbody>
</table>
<h4>Passive checks</h4>
<table class="table-bordered table">
<thead>
<tr>
<td style="width: 300px;">&nbsp;</td>
<td>#</td>
</tr>
</thead>
<tbody>
<tr>
<td>
<strong>Host Checks</strong>
</td>
<td><?= $cp->host_passive_count; ?></td>
</tr>
<tr>
<td>
<strong>Service Checks</strong>
</td>
<td><?= $cp->service_passive_count; ?></td>
</tr>
</tbody>
</table>
<h4>Actuality</h4>
<table class="table-bordered table">
<tbody>
<tr>
<td style="width: 300px;">
<strong>Last status update</strong>
</td>
<td>
<?= $this->dateFormat()->formatDateTime($ps->status_update_time); ?>
(since <?= $this->timeSince($ps->status_update_time); ?> ago)
</td>
</tr>
<tr>
<td>
<strong>Last check command</strong>
</td>
<td>
<?= $this->dateFormat()->formatDateTime($ps->last_command_check); ?>
(since <?= $this->timeSince($ps->last_command_check); ?> ago)
</td>
</tr>
</tbody>
</table>
<h4>Configuration</h4>
<table class="table-bordered table">
<tbody>
<tr>
<td style="width: 300px;">
<strong>Global host event handler</strong>
</td>
<td>
<?php if ($ps->global_host_event_handler): ?>
<?= $ps->global_host_event_handler; ?>
<?php else: ?>
Not set
<?php endif; ?>
</td>
</tr>
<tr>
<td style="width: 300px;">
<strong>Global service event handler</strong>
</td>
<td>
<?php if ($ps->global_service_event_handler): ?>
<?= $ps->global_service_event_handler; ?>
<?php else: ?>
Not set
<?php endif; ?>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-5">
<h6>Global commands goes here</h6>
</div>
</div>