mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 23:04:51 +02:00
Show icinga program version in Monitoring Health
Also emphasize on the backends used. fixes #9207
This commit is contained in:
parent
d1f1f5d7d7
commit
defda53ff5
@ -52,6 +52,7 @@ class Monitoring_ProcessController extends Controller
|
|||||||
'endpoint_name',
|
'endpoint_name',
|
||||||
'program_start_time',
|
'program_start_time',
|
||||||
'status_update_time',
|
'status_update_time',
|
||||||
|
'program_version',
|
||||||
'last_command_check',
|
'last_command_check',
|
||||||
'last_log_rotation',
|
'last_log_rotation',
|
||||||
'global_service_event_handler',
|
'global_service_event_handler',
|
||||||
|
@ -19,6 +19,12 @@ if (! $this->compact): ?>
|
|||||||
<h2><?= $this->translate('Process Info') ?></h2>
|
<h2><?= $this->translate('Process Info') ?></h2>
|
||||||
<table class="avp">
|
<table class="avp">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th><?= $this->translate('Program Version') ?></th>
|
||||||
|
<td><?= $this->programStatus->program_version
|
||||||
|
? $this->programStatus->program_version
|
||||||
|
: $this->translate('N/A') ?></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Program Start Time') ?></th>
|
<th><?= $this->translate('Program Start Time') ?></th>
|
||||||
<td><?= $this->dateFormat()->formatDateTime($this->programStatus->program_start_time) ?></td>
|
<td><?= $this->dateFormat()->formatDateTime($this->programStatus->program_start_time) ?></td>
|
||||||
@ -50,7 +56,7 @@ if (! $this->compact): ?>
|
|||||||
: $this->translate('N/A'); ?></td>
|
: $this->translate('N/A'); ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?= $this->translate('Active IDO Endpoint'); ?></th>
|
<th><?= $this->translate('Active Endpoint'); ?></th>
|
||||||
<td><?= $this->programStatus->endpoint_name
|
<td><?= $this->programStatus->endpoint_name
|
||||||
? $this->programStatus->endpoint_name
|
? $this->programStatus->endpoint_name
|
||||||
: $this->translate('N/A') ?></td>
|
: $this->translate('N/A') ?></td>
|
||||||
@ -60,14 +66,14 @@ if (! $this->compact): ?>
|
|||||||
<?php if ((bool) $this->programStatus->is_currently_running === true): ?>
|
<?php if ((bool) $this->programStatus->is_currently_running === true): ?>
|
||||||
<div class="backend-running">
|
<div class="backend-running">
|
||||||
<?= sprintf(
|
<?= sprintf(
|
||||||
$this->translate('%s has been up and running with PID %d since %s'),
|
$this->translate('Backend %s has been up and running with PID %d since %s'),
|
||||||
$this->backendName,
|
$this->backendName,
|
||||||
$this->programStatus->process_id,
|
$this->programStatus->process_id,
|
||||||
$this->timeSince($this->programStatus->program_start_time)) ?>
|
$this->timeSince($this->programStatus->program_start_time)) ?>
|
||||||
</div>
|
</div>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<div class="backend-not-running">
|
<div class="backend-not-running">
|
||||||
<?= sprintf($this->translate('%s is not running'), $this->backendName) ?>
|
<?= sprintf($this->translate('Backend %s is not running'), $this->backendName) ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,6 +12,7 @@ class ProgramstatusQuery extends IdoQuery
|
|||||||
'programstatus' => array(
|
'programstatus' => array(
|
||||||
'id' => 'programstatus_id',
|
'id' => 'programstatus_id',
|
||||||
'status_update_time' => 'UNIX_TIMESTAMP(programstatus.status_update_time)',
|
'status_update_time' => 'UNIX_TIMESTAMP(programstatus.status_update_time)',
|
||||||
|
'program_version' => 'program_version',
|
||||||
'program_start_time' => 'UNIX_TIMESTAMP(programstatus.program_start_time)',
|
'program_start_time' => 'UNIX_TIMESTAMP(programstatus.program_start_time)',
|
||||||
'program_end_time' => 'UNIX_TIMESTAMP(programstatus.program_end_time)',
|
'program_end_time' => 'UNIX_TIMESTAMP(programstatus.program_end_time)',
|
||||||
'is_currently_running' => 'CASE WHEN (programstatus.is_currently_running = 0)
|
'is_currently_running' => 'CASE WHEN (programstatus.is_currently_running = 0)
|
||||||
@ -56,5 +57,8 @@ class ProgramstatusQuery extends IdoQuery
|
|||||||
if (version_compare($this->getIdoVersion(), '1.11.7', '<')) {
|
if (version_compare($this->getIdoVersion(), '1.11.7', '<')) {
|
||||||
$this->columnMap['programstatus']['endpoint_name'] = '(0)';
|
$this->columnMap['programstatus']['endpoint_name'] = '(0)';
|
||||||
}
|
}
|
||||||
|
if (version_compare($this->getIdoVersion(), '1.11.8', '<')) {
|
||||||
|
$this->columnMap['programstatus']['program_version'] = '(NULL)';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user