mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
enhance smart to show power_on_hours also (#10261)
This commit is contained in:
committed by
Tony Murray
parent
e6ad2b5bb8
commit
349e102b73
@@ -13,10 +13,17 @@ if (isset($vars['disk'])) {
|
||||
$disks=get_disks_with_smart($device, $app['app_id']);
|
||||
}
|
||||
|
||||
$smart_enhancements = array('id9');
|
||||
|
||||
$int=0;
|
||||
while (isset($disks[$int])) {
|
||||
$disk=$disks[$int];
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id, $disk));
|
||||
|
||||
if (in_array($rrdVar, $smart_enhancements)) {
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name.'_'.$rrdVar, $app_id, $disk));
|
||||
} else {
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id, $disk));
|
||||
}
|
||||
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
$rrd_list[]=array(
|
||||
|
9
includes/html/graphs/application/smart_id9.inc.php
Normal file
9
includes/html/graphs/application/smart_id9.inc.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
$unit_text = 'Power On Hours';
|
||||
$unitlen = 20;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
|
||||
$rrdVar='id9';
|
||||
|
||||
require 'smart-common.inc.php';
|
24
includes/html/graphs/application/smart_runtime.inc.php
Normal file
24
includes/html/graphs/application/smart_runtime.inc.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$name = 'smart';
|
||||
$app_id = $app['app_id'];
|
||||
$unit_text = '';
|
||||
$unitlen = 20;
|
||||
$bigdescrlen = 15;
|
||||
$smalldescrlen = 15;
|
||||
$colours = 'mega';
|
||||
$dostack = 0;
|
||||
$printtotal = 0;
|
||||
$addarea = 1;
|
||||
$transparency = 15;
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], array('app', $name, $app_id, $vars['disk']));
|
||||
|
||||
if (rrdtool_check_rrd_exists($rrd_filename)) {
|
||||
$rrd_list[]=array(
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'Power On Hours',
|
||||
'ds' => 'id9',
|
||||
);
|
||||
}
|
||||
|
||||
require 'includes/html/graphs/generic_multi_line_exact_numbers.inc.php';
|
Reference in New Issue
Block a user