mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
security fixes and some juniper graphing stuff.
git-svn-id: http://www.observium.org/svn/observer/trunk@245 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -315,6 +315,21 @@ function bgpupdatesgraph ($rrd, $graph , $from, $to, $width, $height) {
|
||||
return $imgfile;
|
||||
}
|
||||
|
||||
function graph_cpu_generic_single ($rrd, $graph , $from, $to, $width, $height) {
|
||||
global $config;
|
||||
$database = $config['rrd_dir'] . "/" . $rrd;
|
||||
$imgfile = "graphs/" . "$graph";
|
||||
$options = "--alt-autoscale-max -l 0 -E --start $from --end $to --width $width --height $height ";
|
||||
if($width <= "300") {$options .= " --font LEGEND:7:".$config['mono_font']." --font AXIS:6:".$config['mono_font']." --font-render-mode normal "; }
|
||||
$options .= " DEF:cpu=$database:cpu:AVERAGE";
|
||||
$options .= " COMMENT:\ \ \ \ \ \ \ \ \ \ Current\ \ Minimum\ \ Maximum\ \ Average\\\\n";
|
||||
$options .= " AREA:cpu#ffee99: LINE1.25:cpu#aa2200:Load\ %";
|
||||
$options .= " GPRINT:cpu:LAST:%6.2lf\ GPRINT:cpu:AVERAGE:%6.2lf\ ";
|
||||
$options .= " GPRINT:cpu:MAX:%6.2lf\ GPRINT:cpu:AVERAGE:%6.2lf\\\\n";
|
||||
$thing = shell_exec($config['rrdtool'] . " graph $imgfile $options");
|
||||
return $imgfile;
|
||||
}
|
||||
|
||||
|
||||
function cpugraph ($rrd, $graph , $from, $to, $width, $height) {
|
||||
global $config, $installdir;
|
||||
|
||||
Reference in New Issue
Block a user