mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Modify some locations to be more organised and move uptime tracking to a seperate table.
git-svn-id: http://www.observium.org/svn/observer/trunk@38 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -14,8 +14,8 @@ function callsgraphSNOM ($rrd, $graph, $from, $to, $width, $height, $title, $ver
|
||||
"GPRINT:calls:LAST:Cu\: %2.0lf/min",
|
||||
"GPRINT:calls:AVERAGE:Av\: %2.0lf/min",
|
||||
"GPRINT:calls:MAX:Mx\: %2.0lf/min\\n");
|
||||
if($width <= "300") {$optsb = array("--font", "LEGEND:7:$installdir/DejaVuSansMono.ttf",
|
||||
"--font", "AXIS:6:$installdir/DejaVuSansMono.ttf",
|
||||
if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font",
|
||||
"--font", "AXIS:6:$mono_font",
|
||||
"--font-render-mode", "normal");}
|
||||
|
||||
$opts = array_merge($optsa, $optsb);
|
||||
|
||||
@@ -585,43 +585,3 @@ function apachebitsgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title,
|
||||
return $imgfile;
|
||||
}
|
||||
}
|
||||
|
||||
function tempgraphUnix ($rrd, $graph, $from, $to, $width, $height, $title, $vertical)
|
||||
{
|
||||
global $rrdtool, $installdir, $mono_font;
|
||||
$database = "rrd/" . $rrd;
|
||||
$imgfile = "graphs/" . "$graph";
|
||||
|
||||
$optsa = array( "--start", $from, "--end", $to, "--width", $width, "--height", $height, "--vertical-label", $vertical ,"--alt-autoscale-max",
|
||||
"-E", "-l 0", "--title", $title,
|
||||
"DEF:cpu=$database:cputemp:AVERAGE",
|
||||
"DEF:sys=$database:systemp:AVERAGE",
|
||||
"LINE1.25:cpu#cc0000:CPU ",
|
||||
"GPRINT:cpu:LAST:Cur\:%6.2lf",
|
||||
"GPRINT:cpu:AVERAGE:Avg\: %6.2lf",
|
||||
"GPRINT:cpu:MIN:Min\:%6.2lf",
|
||||
"GPRINT:cpu:MAX:Max\:%6.2lf\\n",
|
||||
"LINE1.25:sys#009900:System ",
|
||||
"GPRINT:sys:LAST:Cur\:%6.2lf",
|
||||
"GPRINT:sys:AVERAGE:Avg\: %6.2lf",
|
||||
"GPRINT:sys:MIN:Min\:%6.2lf",
|
||||
"GPRINT:sys:MAX:Max\:%6.2lf\\n");
|
||||
|
||||
if($width <= "300") {$optsb = array("--font", "LEGEND:7:$mono_font",
|
||||
"--font", "AXIS:6:$mono_font",
|
||||
"--font-render-mode", "normal");}
|
||||
|
||||
$opts = array_merge($optsa, $optsb);
|
||||
|
||||
|
||||
$ret = rrd_graph("$imgfile", $opts, count($opts));
|
||||
if( !is_array($ret) ) {
|
||||
$err = rrd_error();
|
||||
# echo "rrd_graph() ERROR: $err\n";
|
||||
return FALSE;
|
||||
} else {
|
||||
return $imgfile;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user