Move process info and performance info overview into monitoring health
The process info and the performance info overviews are now moved to monitoring health and are available both under the 'Monitoring Health' section. But this is not the final look, we should redesign it and add more relative information data and drop unused
This commit is contained in:
parent
a4f4c8d27f
commit
e97f08663e
|
@ -23,16 +23,9 @@ class Monitoring_ProcessController extends Controller
|
|||
->add(
|
||||
'info',
|
||||
array(
|
||||
'title' => $this->translate('Process Info'),
|
||||
'title' => $this->translate('Monitoring Health'),
|
||||
'url' =>'monitoring/process/info'
|
||||
)
|
||||
)
|
||||
->add(
|
||||
'performance',
|
||||
array(
|
||||
'title' => $this->translate('Performance Info'),
|
||||
'url' => 'monitoring/process/performance'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -41,7 +34,7 @@ class Monitoring_ProcessController extends Controller
|
|||
*/
|
||||
public function infoAction()
|
||||
{
|
||||
$this->view->title = $this->translate('Process Info');
|
||||
$this->view->title = $this->translate('Monitoring Health');
|
||||
$this->getTabs()->activate('info');
|
||||
$this->setAutorefreshInterval(10);
|
||||
$this->view->backendName = $this->backend->getName();
|
||||
|
@ -80,6 +73,14 @@ class Monitoring_ProcessController extends Controller
|
|||
->load($programStatus)
|
||||
->handleRequest();
|
||||
$this->view->toggleFeaturesForm = $toggleFeaturesForm;
|
||||
|
||||
$this->view->runtimevariables = (object) $this->backend->select()
|
||||
->from('runtimevariables', array('varname', 'varvalue'))
|
||||
->getQuery()->fetchPairs();
|
||||
|
||||
$this->view->checkperformance = $this->backend->select()
|
||||
->from('runtimesummary')
|
||||
->getQuery()->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -111,6 +112,9 @@ class Monitoring_ProcessController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo should be dropped later
|
||||
*/
|
||||
public function performanceAction()
|
||||
{
|
||||
$this->getTabs()->activate('performance');
|
||||
|
|
|
@ -1,55 +1,171 @@
|
|||
<?php
|
||||
|
||||
$rv = $this->runtimeVariables()->create($this->runtimevariables);
|
||||
$cp = $this->checkPerformance()->create($this->checkperformance);
|
||||
|
||||
?>
|
||||
<div class="controls">
|
||||
<?= $this->tabs ?>
|
||||
</div>
|
||||
|
||||
<div class="content processinfo">
|
||||
<?php if ((bool) $this->programStatus->is_currently_running === true): ?>
|
||||
<div class="backend-running">
|
||||
<?= sprintf(
|
||||
$this->translate('%s has been up and running with PID %d since %s'),
|
||||
$this->backendName,
|
||||
$this->programStatus->process_id,
|
||||
$this->timeSince($this->programStatus->program_start_time)) ?>
|
||||
<div class="boxview">
|
||||
|
||||
<div class="box left">
|
||||
<h2><?= $this->translate('Feature Commands') ?></h2>
|
||||
<?= $this->toggleFeaturesForm ?>
|
||||
</div>
|
||||
|
||||
<div class="box left">
|
||||
<h2><?= $this->translate('Process Info') ?></h2>
|
||||
<table class="avp">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?= $this->translate('Program Start Time') ?></th>
|
||||
<td><?= $this->dateFormat()->formatDateTime($this->programStatus->program_start_time) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last Status Update'); ?></th>
|
||||
<td><?= $this->timeSince($this->programStatus->status_update_time) ?> ago</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last External Command Check'); ?></th>
|
||||
<td><?= $this->timeSince($this->programStatus->last_command_check) ?> ago</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last Log File Rotation'); ?></th>
|
||||
<td><?= $this->programStatus->last_log_rotation
|
||||
? $this->timeSince($this->programStatus->last_log_rotation)
|
||||
: $this->translate('N/A') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Global Service Event Handler'); ?></th>
|
||||
<td><?= $this->programStatus->global_service_event_handler
|
||||
? $this->programStatus->global_service_event_handler
|
||||
: $this->translate('N/A'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Global Host Event Handler'); ?></th>
|
||||
<td><?= $this->programStatus->global_host_event_handler
|
||||
? $this->programStatus->global_host_event_handler
|
||||
: $this->translate('N/A'); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ((bool) $this->programStatus->is_currently_running === true): ?>
|
||||
<div class="backend-running">
|
||||
<?= sprintf(
|
||||
$this->translate('%s has been up and running with PID %d since %s'),
|
||||
$this->backendName,
|
||||
$this->programStatus->process_id,
|
||||
$this->timeSince($this->programStatus->program_start_time)) ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="backend-not-running">
|
||||
<?= sprintf($this->translate('%s is not running'), $this->backendName) ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<div class="box left">
|
||||
<h2><?= $this->translate('Performance Info') ?></h2>
|
||||
|
||||
<h3>Object summaries</h3>
|
||||
<table class="avp">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>overall</th>
|
||||
<th>scheduled</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Hosts</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?= $rv->total_hosts; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $rv->total_scheduled_hosts; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Services</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?= $rv->total_services; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $rv->total_scheduled_services; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<strong>Average services per host</strong>
|
||||
</td>
|
||||
<td>
|
||||
<?= sprintf('%.2f', $rv->average_services_per_host); ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= sprintf('%.2f', $rv->average_scheduled_services_per_host); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>Active checks</h3>
|
||||
<table class="avp">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Latency</th>
|
||||
<th>Execution time</th>
|
||||
</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>
|
||||
|
||||
<h3>Passive checks</h3>
|
||||
<table class="avp">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="backend-not-running">
|
||||
<?= sprintf($this->translate('%s is not running'), $this->backendName) ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<table class="avp">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><?= $this->translate('Program Start Time') ?></th>
|
||||
<td><?= $this->dateFormat()->formatDateTime($this->programStatus->program_start_time) ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last Status Update'); ?></th>
|
||||
<td><?= $this->timeSince($this->programStatus->status_update_time) ?> ago</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last External Command Check'); ?></th>
|
||||
<td><?= $this->timeSince($this->programStatus->last_command_check) ?> ago</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Last Log File Rotation'); ?></th>
|
||||
<td><?= $this->programStatus->last_log_rotation
|
||||
? $this->timeSince($this->programStatus->last_log_rotation)
|
||||
: $this->translate('N/A') ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Global Service Event Handler'); ?></th>
|
||||
<td><?= $this->programStatus->global_service_event_handler
|
||||
? $this->programStatus->global_service_event_handler
|
||||
: $this->translate('N/A'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?= $this->translate('Global Host Event Handler'); ?></th>
|
||||
<td><?= $this->programStatus->global_host_event_handler
|
||||
? $this->programStatus->global_host_event_handler
|
||||
: $this->translate('N/A'); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<?= $this->toggleFeaturesForm ?>
|
||||
</div>
|
||||
|
|
|
@ -136,14 +136,10 @@ $section->add($this->translate('Alert Summary'), array(
|
|||
* System Section
|
||||
*/
|
||||
$section = $this->menuSection($this->translate('System'));
|
||||
$section->add($this->translate('Process Info'), array(
|
||||
$section->add($this->translate('Monitoring Health'), array(
|
||||
'url' => 'monitoring/process/info',
|
||||
'priority' => 120
|
||||
));
|
||||
$section->add($this->translate('Performance Info'), array(
|
||||
'url' => 'monitoring/process/performance',
|
||||
'priority' => 130
|
||||
));
|
||||
|
||||
/*
|
||||
* Dashboard
|
||||
|
|
|
@ -173,3 +173,7 @@ table.benchmark {
|
|||
.dashboard table.benchmark {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.left {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
|
|
@ -311,6 +311,13 @@ a.critical {
|
|||
.boxview div.box h2:first-child > a:hover {
|
||||
}
|
||||
|
||||
.boxview div.box h3 {
|
||||
line-height: 1.5em;
|
||||
font-size: 0.9em;
|
||||
color: #555;
|
||||
border-bottom: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
/* Box body of contents */
|
||||
.boxview div.box.contents {
|
||||
padding: 0.2em;
|
||||
|
|
Loading…
Reference in New Issue