mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
26 lines
601 B
PHP
26 lines
601 B
PHP
<?php
|
|
|
|
$name = 'hv-monitor';
|
|
$unit_text = 'CPU Usage %';
|
|
$colours = 'psychedelic';
|
|
$dostack = 0;
|
|
$printtotal = 0;
|
|
$addarea = 0;
|
|
$transparency = 15;
|
|
|
|
if (isset($vars['vm'])) {
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, 'vm', $vars['vm']]);
|
|
} else {
|
|
$rrd_filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id]);
|
|
}
|
|
|
|
if (Rrd::checkRrdExists($rrd_filename)) {
|
|
$filename = $rrd_filename;
|
|
$descr = 'CPU%';
|
|
$ds = 'pcpu';
|
|
} else {
|
|
d_echo('RRD "' . $rrd_filename . '" not found');
|
|
}
|
|
|
|
require 'includes/html/graphs/generic_stats.inc.php';
|