Juniper Netscreen Additions

git-svn-id: http://www.observium.org/svn/observer/trunk@174 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-20 11:53:19 +00:00
parent d4eb0e21d9
commit 387c6be30a
7 changed files with 60 additions and 31 deletions
+9
View File
@@ -45,6 +45,15 @@
switch ($type) {
case 'netscreen_sessions':
$graph = graph_netscreen_sessions ($hostname . "/netscreen-sessions.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
break;
case 'netscreen_cpu':
$graph = graph_netscreen_cpu ($hostname . "/netscreen-cpu.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
break;
case 'netscreen_memory':
$graph = graph_netscreen_memory ($hostname . "/netscreen-memory.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical);
break;
case 'multi_bits':
$graph = graph_multi_bits ($_GET['interfaces'], $graphfile, $from, $to, $width, $height);
break;
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

+13
View File
@@ -8,6 +8,19 @@ while($device = mysql_fetch_array($device_query)) {
echo("<div style='clear: both;'>");
switch ($device['os']) {
case "ScreenOS":
echo("<div class=graphhead>Processor Utilisation</div>");
$graph_type = "netscreen_cpu"; include ("includes/print-device-graph.php");
echo("<div class=graphhead>Memory Usage</div>");
$graph_type = "netscreen_memory"; include ("includes/print-device-graph.php");
echo("<div class=graphhead>Firewall Sessions</div>");
$graph_type = "netscreen_sessions"; include ("includes/print-device-graph.php");
break;
case "ProCurve":
echo("<div class=graphhead>Processor Utilisation</div>");
$graph_type = "cpu"; include ("includes/print-device-graph.php");
+2
View File
@@ -1,5 +1,7 @@
<?php
include("graphing/screenos.php");
function graph_multi_bits ($interfaces, $graph, $from, $to, $width, $height) {
global $config, $rrdtool, $installdir, $mono_font;
$imgfile = "graphs/" . "$graph";
+4
View File
@@ -57,6 +57,10 @@ while ($interface = mysql_fetch_array($interface_query)) {
RRA:MAX:0.5:288:797`;
}
if( file_exists("includes/polling/interface-" . $device['os'] . ".php") ) { include("includes/polling/interface-" . $device['os'] . ".php"); }
if ( $interface['ifAlias'] != $ifAlias ) {
$update .= $seperator . "`ifAlias` = '$ifAlias'";
$seperator = ", ";
+1
View File
@@ -191,6 +191,7 @@ while ($device = mysql_fetch_array($device_query)) {
include("includes/polling/temperatures.inc.php");
include("includes/polling/device-netstats.inc.php");
echo("Polling interfaces\n");
$where = "WHERE device_id = '" . $device['device_id'] . "'";
include("includes/polling/interfaces.inc.php");