2020-02-12 08:26:02 +01:00
|
|
|
<?php
|
2020-09-21 15:40:17 +02:00
|
|
|
|
2020-02-12 08:26:02 +01:00
|
|
|
$unitlen = 10;
|
|
|
|
|
$bigdescrlen = 20;
|
|
|
|
|
$smalldescrlen = 20;
|
|
|
|
|
$dostack = 0;
|
|
|
|
|
$printtotal = 0;
|
|
|
|
|
$unit_text = 'Resources';
|
|
|
|
|
$colours = 'psychedelic';
|
|
|
|
|
$rrd_list = [];
|
|
|
|
|
|
2022-07-22 16:01:55 -05:00
|
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', 'puppet-agent', $app->app_id, 'resources']);
|
2020-02-12 08:26:02 +01:00
|
|
|
$array = [
|
|
|
|
|
'changed',
|
|
|
|
|
'corrective_change',
|
|
|
|
|
'failed',
|
|
|
|
|
'failed_to_restart',
|
|
|
|
|
'out_of_sync',
|
|
|
|
|
'restarted',
|
|
|
|
|
'scheduled',
|
|
|
|
|
'skipped',
|
|
|
|
|
'total',
|
|
|
|
|
];
|
2021-03-28 17:25:30 -05:00
|
|
|
if (Rrd::checkRrdExists($rrd_filename)) {
|
2020-02-12 08:26:02 +01:00
|
|
|
foreach ($array as $ds) {
|
|
|
|
|
$rrd_list[] = [
|
|
|
|
|
'filename' => $rrd_filename,
|
|
|
|
|
'descr' => $ds,
|
|
|
|
|
'ds' => $ds,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
echo "file missing: $file";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
require 'includes/html/graphs/generic_multi_line_exact_numbers.inc.php';
|