mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add HV Monitor, a generic means for monitoring hypvervisors (#14218)
* add HV::Monitor support * document hv monitor * add HV Monitor tests * style cleanup * fix a few missed style items * test fix * more test cleanup * more minor test tweaks * more test cleanup * more test tweaking * test ordering fix all done... hopefully * more test cleanup * minor formatting change
This commit is contained in:
committed by
GitHub
parent
9d3d81bb11
commit
8511611f64
28
includes/html/graphs/application/hv-monitor_pcpu.inc.php
Normal file
28
includes/html/graphs/application/hv-monitor_pcpu.inc.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
$name = 'hv-monitor';
|
||||
$unit_text = 'Memory 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]);
|
||||
}
|
||||
|
||||
$rrd_list = [];
|
||||
if (Rrd::checkRrdExists($rrd_filename)) {
|
||||
$rrd_list[] = [
|
||||
'filename' => $rrd_filename,
|
||||
'descr' => 'CPU%',
|
||||
'ds' => 'pcpu',
|
||||
];
|
||||
} else {
|
||||
d_echo('RRD "' . $rrd_filename . '" not found');
|
||||
}
|
||||
|
||||
require 'includes/html/graphs/generic_multi_line.inc.php';
|
Reference in New Issue
Block a user