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

385 lines
12 KiB
PHTML

<?php
$rv = $this->runtimevariables;
$ps = $this->programstatus;
$cp = $this->checkPerformance()->create($this->checkperformance);
/** @var Zend_View_Helper_CommandForm $ch */
$ch = $this->getHelper('CommandForm');
?>
<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">
<h4>Commands</h4>
<?=
$ch->labelSubmitForm(
'Shutdown monitoring process',
'Shutdown the monitoring process',
'btn-cta',
'shutdownprocess'
);
?>
<br />
<?=
$ch->labelSubmitForm(
'Restart monitoring process',
'Restart the monitoring process',
'btn-cta',
'restartprocess'
);
?>
<?php if ($ps->notifications_enabled === '1'): ?>
<br />
<a rel="tooltip" title="Disable notifications for a specific time on a program-wide basis"
href="<?= $this->href('monitoring/command/disablenotificationswithexpire'); ?>"
class="button btn-cta btn-full-width">
Disable notification with expire
</a>
<?php endif; ?>
<br />
<table class="table">
<tbody>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Notifications enabled',
$ps->notifications_enabled,
'enablenotifications',
'disablenotifications',
false,
array(
'global' => '1'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Execute active service checks',
$ps->active_service_checks_enabled,
'enableactivechecks',
'disableactivechecks',
false,
array(
'global' => 'service'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Accept passive service checks',
$ps->passive_service_checks_enabled,
'startacceptingpassivechecks',
'stopacceptingpassivechecks',
false,
array(
'global' => 'service'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Execute active host checks',
$ps->active_host_checks_enabled,
'enableactivechecks',
'disableactivechecks',
false,
array(
'global' => 'host'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Accept passive host checks',
$ps->passive_host_checks_enabled,
'startacceptingpassivechecks',
'stopacceptingpassivechecks',
false,
array(
'global' => 'host'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Eventhandlers enabled',
$ps->event_handlers_enabled,
'enableeventhandler',
'disableeventhandler',
false,
array(
'global' => '1'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Obsessing over host checks',
$ps->obsess_over_hosts,
'startobsessing',
'stopobsessing',
false,
array(
'global' => 'host'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Obsessing over service checks',
$ps->obsess_over_services,
'startobsessing',
'stopobsessing',
false,
array(
'global' => 'service'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Flap detection enabled',
$ps->flap_detection_enabled,
'enableflapdetection',
'disableflapdetection',
false,
array(
'global' => '1'
)
);
?>
</td>
</tr>
<tr>
<td>
<?=
$ch->toggleSubmitForm(
'Process performance data',
$ps->process_performance_data,
'enableperformancedata',
'disableperformancedata',
false,
array(
'global' => '1'
)
);
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>