git-svn-id: http://www.observium.org/svn/observer/trunk@239 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-04-25 13:38:52 +00:00
parent b4156b03d4
commit 313a66eb50
3 changed files with 11 additions and 9 deletions

View File

@@ -123,9 +123,9 @@
} elseif($os == "Snom") {
$graph = callsgraphSNOM ($hostname . "/data.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
} elseif($os == "ScreenOS") {
$graph = graph_netscreen_cpu ($hostname . "/data.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
$graph = graph_netscreen_cpu ($hostname . "/netscreen-cpu.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
} elseif($os == "Fortigate") {
$graph = graph_fortinet_cpu ($hostname . "/data.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
$graph = graph_fortigate_cpu ($hostname . "/fortigate-cpu.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
}

View File

@@ -4,10 +4,11 @@ function graph_fortigate_sessions ($rrd, $graph, $from, $to, $width, $height, $t
global $config;
$database = $config['rrd_dir'] . "/" . $rrd;
$imgfile = "graphs/" . "$graph";
$options = "-Y -E --start $from --end $to --width $width --height $height ";
$options = "-l 0 -Y -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:sessions=$database:sessions:AVERAGE";
$options .= " COMMENT:Sessions\ \ \ \ \ \ Current\ \ \ \ Average\ \ \ \ Maximum\\\\n";
$options .= " AREA:sessions#ccffcc:";
$options .= " LINE1.25:sessions#006600:Allocated";
$options .= " GPRINT:sessions:LAST:\ %6.0lf";
$options .= " GPRINT:sessions:AVERAGE:\ \ \ %6.0lf";
@@ -25,7 +26,8 @@ function graph_fortigate_cpu ($rrd, $graph, $from, $to, $width, $height, $title,
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:Usage\ \ \ \ \ \ \ Current\ \ \ \ \ Average\ \ \ \ Maximum\\\\n";
$options .= " LINE1.25:cpu#2020c0:Average";
$options .= " AREA:cpu#ffcccc:";
$options .= " LINE1.25:cpu#c02020:Average";
$options .= " GPRINT:cpu:LAST:\ \ %5.2lf%%";
$options .= " GPRINT:cpu:AVERAGE:\ \ \ %5.2lf%%";
$options .= " GPRINT:cpu:MAX:\ \ \ %5.2lf%%\\\\n";
@@ -44,7 +46,7 @@ function graph_fortigate_memory ($rrd, $graph, $from, $to, $width, $height, $tit
$options .= " CDEF:used=kcap,1024,*,100,/,mem,*";
$options .= " CDEF:cap=kcap,1024,*";
$options .= " COMMENT:Memory\ \ \ \ \ \ \ \ Current\ \ \ \ \ Average\ \ \ \ Maximum\\\\n";
$options .= " AREA:mem#ffcccc";
$options .= " AREA:used#ffcccc";
$options .= " LINE1.25:used#cc0000:Used\ \ \ \ \ ";
$options .= " GPRINT:used:MAX:%6.2lf%sB";
$options .= " GPRINT:used:AVERAGE:\ %6.2lf%sB";

View File

@@ -4,7 +4,7 @@ function graph_netscreen_sessions ($rrd, $graph, $from, $to, $width, $height, $t
global $config;
$database = $config['rrd_dir'] . "/" . $rrd;
$imgfile = "graphs/" . "$graph";
$options = "-Y -E --start $from --end $to --width $width --height $height ";
$options = "-l 0 -Y -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:alloc=$database:allocate:AVERAGE";
$options .= " DEF:max=$database:max:AVERAGE";
@@ -25,12 +25,12 @@ function graph_netscreen_cpu ($rrd, $graph, $from, $to, $width, $height, $title,
$database = $config['rrd_dir'] . "/" . $rrd;
$imgfile = "graphs/" . "$graph";
$period = $to - $from;
$options = "-Y -E --start $from --end $to --width $width --height $height ";
$options = "-l 0 -Y -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:av=$database:average:AVERAGE";
$options .= " DEF:5m=$database:5min:AVERAGE";
$options .= " COMMENT:Usage\ \ \ \ \ \ \ Current\ \ \ \ \ Average\ \ \ \ Maximum\\\\n";
$options .= " AREA:5m#eeee00";
$options .= " AREA:5m#ffcccc";
$options .= " LINE1.25:5m#aa2000:5min";
$options .= " GPRINT:5m:LAST:\ \ \ \ \ %5.2lf%%";
$options .= " GPRINT:5m:AVERAGE:\ \ \ %5.2lf%%";
@@ -47,7 +47,7 @@ function graph_netscreen_memory ($rrd, $graph, $from, $to, $width, $height, $tit
global $config;
$database = $config['rrd_dir'] . "/" . $rrd;
$imgfile = "graphs/" . "$graph";
$options = "-Y -E --start $from --end $to --width $width --height $height ";
$options = "-l 0 -Y -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:alloc=$database:allocate:AVERAGE";
$options .= " DEF:left=$database:left:AVERAGE";