Files

41 lines
936 B
PHP
Raw Permalink Normal View History

<?php
2020-09-21 15:40:17 +02:00
$name = 'smart';
$app_id = $app['app_id'];
2020-09-21 15:40:17 +02:00
$colours = 'mega';
$dostack = 0;
$printtotal = 0;
$addarea = 1;
$transparency = 15;
$scale_min = 0;
if (isset($vars['disk'])) {
2020-09-21 15:40:17 +02:00
$disks = [$vars['disk']];
} else {
2020-06-17 14:00:18 +02:00
$disks = get_arrays_with_application($device, $app_id, $name);
}
2020-09-21 15:40:17 +02:00
$smart_enhancements = ['id9'];
2020-09-21 15:40:17 +02:00
$int = 0;
while (isset($disks[$int])) {
2020-09-21 15:40:17 +02:00
$disk = $disks[$int];
if (in_array($rrdVar, $smart_enhancements)) {
2020-09-21 15:40:17 +02:00
$rrd_filename = rrd_name($device['hostname'], ['app', $name . '_' . $rrdVar, $app_id, $disk]);
} else {
2020-09-21 15:40:17 +02:00
$rrd_filename = rrd_name($device['hostname'], ['app', $name, $app_id, $disk]);
}
if (rrdtool_check_rrd_exists($rrd_filename)) {
2020-09-21 15:40:17 +02:00
$rrd_list[] = [
'filename' => $rrd_filename,
'descr' => $disk,
'ds' => $rrdVar,
2020-09-21 15:40:17 +02:00
];
}
$int++;
}
2019-04-11 23:26:42 -05:00
require 'includes/html/graphs/generic_multi_line_exact_numbers.inc.php';