mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 06:40:12 +01:00
health page displays piler version
This commit is contained in:
parent
78728c2c6e
commit
925b108457
@ -202,6 +202,7 @@ $config['SPHINX_NOTE_INDEX'] = 'note1';
|
|||||||
$config['RELOAD_COMMAND'] = 'sudo -n /etc/init.d/rc.piler reload';
|
$config['RELOAD_COMMAND'] = 'sudo -n /etc/init.d/rc.piler reload';
|
||||||
$config['PILERIMPORT_IMAP_COMMAND'] = '/usr/local/bin/pilerimport -d /var/piler/imap -q -r';
|
$config['PILERIMPORT_IMAP_COMMAND'] = '/usr/local/bin/pilerimport -d /var/piler/imap -q -r';
|
||||||
$config['CPU_USAGE_COMMAND'] = "LC_ALL=C mpstat | tail -1 | rev | awk '{ print $1 }' | rev";
|
$config['CPU_USAGE_COMMAND'] = "LC_ALL=C mpstat | tail -1 | rev | awk '{ print $1 }' | rev";
|
||||||
|
$config['PILER_BINARY'] = "/usr/local/sbin/piler";
|
||||||
|
|
||||||
$config['LDAP_IMPORT_CONFIG_FILE'] = '/usr/local/etc/ldap-import.cfg';
|
$config['LDAP_IMPORT_CONFIG_FILE'] = '/usr/local/etc/ldap-import.cfg';
|
||||||
|
|
||||||
|
@ -50,6 +50,9 @@ class ControllerHealthWorker extends Controller {
|
|||||||
|
|
||||||
list ($this->data['uptime'], $this->data['cpuload']) = $this->model_health_health->uptime();
|
list ($this->data['uptime'], $this->data['cpuload']) = $this->model_health_health->uptime();
|
||||||
|
|
||||||
|
exec(PILER_BINARY . " -v", $a);
|
||||||
|
$this->data['piler_version'] = $a[0];
|
||||||
|
|
||||||
$x = exec(CPU_USAGE_COMMAND);
|
$x = exec(CPU_USAGE_COMMAND);
|
||||||
$this->data['cpuinfo'] = 100 - (int)$x;
|
$this->data['cpuinfo'] = 100 - (int)$x;
|
||||||
|
|
||||||
|
@ -7,6 +7,11 @@
|
|||||||
<h2><i class="icon-dashboard icon-2x pull-left"></i><?php print $sysinfo[0]; ?> <small><?php print $text_status; ?></small></h2>
|
<h2><i class="icon-dashboard icon-2x pull-left"></i><?php print $sysinfo[0]; ?> <small><?php print $text_status; ?></small></h2>
|
||||||
<h3><strong>Up For:</strong> <?php print $uptime; ?></h3>
|
<h3><strong>Up For:</strong> <?php print $uptime; ?></h3>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
|
<tr>
|
||||||
|
<th class="span4">Piler:</th>
|
||||||
|
<td class="span8"> <?php print $piler_version; ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th class="span4"><?php print $text_server_operating_system; ?>:</th>
|
<th class="span4"><?php print $text_server_operating_system; ?>:</th>
|
||||||
<td class="span8"> <?php print $sysinfo[1]; ?></td>
|
<td class="span8"> <?php print $sysinfo[1]; ?></td>
|
||||||
|
@ -12,6 +12,11 @@
|
|||||||
<div class="cellhealthright"><?php print $sysinfo[0]; ?></div>
|
<div class="cellhealthright"><?php print $sysinfo[0]; ?></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="cellhealthleft">Piler</div>
|
||||||
|
<div class="cellhealthright"><?php print $piler_version; ?></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="cellhealthleft"><?php print $text_server_operating_system; ?></div>
|
<div class="cellhealthleft"><?php print $text_server_operating_system; ?></div>
|
||||||
<div class="cellhealthright"><?php print $sysinfo[1]; ?></div>
|
<div class="cellhealthright"><?php print $sysinfo[1]; ?></div>
|
||||||
|
Loading…
Reference in New Issue
Block a user