Files
librenms-librenms/includes/html/graphs/application/pwrstatd-common.inc.php
bnerickson 4efbb83d9b Add pwrstatd application (#14365)
* Add pwrstatd application

* Adding pwrstatd test json and correcting pwrstatd snmprec file.  Pwrstatd tests pass.
2022-10-12 11:01:09 +02:00

37 lines
807 B
PHP

<?php
$name = 'pwrstatd';
$colours = 'mega';
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 15;
$scale_min = 0;
if (isset($vars['sn'])) {
$sn_list = [$vars['sn']];
} else {
$sn_list = Rrd::getRrdApplicationArrays($device, $app->app_id, $name);
}
$rrd_list = [];
$i = 0;
while (isset($sn_list[$i])) {
$sn = $sn_list[$i];
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, $sn]);
$j = 0;
if (Rrd::checkRrdExists($rrd_filename)) {
foreach ($rrdArray as $ds => $var) {
$rrd_list[$j]['filename'] = $rrd_filename;
$rrd_list[$j]['descr'] = $var['descr'];
$rrd_list[$j]['ds'] = $ds;
$j++;
}
}
$i++;
}
require 'includes/html/graphs/generic_multi_line_exact_numbers.inc.php';