2009-09-07 11:07:59 +00:00
|
|
|
<?php
|
2007-04-04 10:15:07 +00:00
|
|
|
|
2007-04-08 14:34:19 +00:00
|
|
|
$device_query = mysql_query("select * from devices WHERE `device_id` = '$_GET[id]'");
|
2007-04-04 10:15:07 +00:00
|
|
|
while($device = mysql_fetch_array($device_query)) {
|
|
|
|
$hostname = $device[hostname];
|
|
|
|
$bg="#ffffff";
|
|
|
|
|
|
|
|
echo("<div style='clear: both;'>");
|
|
|
|
|
2009-04-23 21:13:56 +00:00
|
|
|
if(is_file($config['install_dir'] . "/html/pages/device/graphs/os-$os.inc.php")) {
|
|
|
|
include($config['install_dir'] . "/html/pages/device/graphs/os-$os.inc.php");
|
|
|
|
}
|
|
|
|
|
2009-11-28 09:48:23 +00:00
|
|
|
if($os_groups[$device[os]]) {$os_group = $os_groups[$device[os]];}
|
2008-09-03 20:04:34 +00:00
|
|
|
|
2009-11-28 09:48:23 +00:00
|
|
|
if(is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os'].".inc.php")) {
|
|
|
|
/// OS Specific
|
|
|
|
include($config['install_dir'] . "/html/pages/device/graphs/os-".$device['os'].".inc.php");
|
|
|
|
}elseif($os_group && is_file($config['install_dir'] . "/html/pages/device/graphs/os-".$os_group.".inc.php")) {
|
|
|
|
/// OS Group Specific
|
|
|
|
include($config['install_dir'] . "/html/pages/device/graphs/os-".$os_group.".inc.php");
|
|
|
|
} else {
|
2008-09-03 20:04:34 +00:00
|
|
|
|
2008-07-22 08:24:34 +00:00
|
|
|
|
|
|
|
|
2009-11-28 09:48:23 +00:00
|
|
|
switch ($device['os']) {
|
|
|
|
case "fortigate":
|
2008-04-03 21:52:59 +00:00
|
|
|
echo("<div class=graphhead>Processor Utilisation</div>");
|
|
|
|
$graph_type = "fortigate_cpu"; include ("includes/print-device-graph.php");
|
|
|
|
echo("<div class=graphhead>Memory Usage</div>");
|
|
|
|
$graph_type = "fortigate_memory"; include ("includes/print-device-graph.php");
|
|
|
|
echo("<div class=graphhead>Firewall Sessions</div>");
|
|
|
|
$graph_type = "fortigate_sessions"; include ("includes/print-device-graph.php");
|
2008-09-03 20:04:34 +00:00
|
|
|
|
2009-04-18 21:57:32 +00:00
|
|
|
include("graphs/netstats.inc.php");
|
|
|
|
include("graphs/uptime.inc.php");
|
2008-09-03 20:04:34 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
2009-11-28 09:48:23 +00:00
|
|
|
case "bcm96348":
|
2008-09-03 20:04:34 +00:00
|
|
|
echo("<div class=graphhead>ADSL Attainable Rate</div>");
|
|
|
|
$graph_type = "adsl_rate"; include ("includes/print-device-graph.php");
|
|
|
|
echo("<br />");
|
|
|
|
echo("<div class=graphhead>ADSL Signal-to-Noise Margin</div>");
|
|
|
|
$graph_type = "adsl_snr"; include ("includes/print-device-graph.php");
|
|
|
|
echo("<br />");
|
|
|
|
echo("<div class=graphhead>ADSL Attenuation</div>");
|
|
|
|
$graph_type = "adsl_atn"; include ("includes/print-device-graph.php");
|
|
|
|
echo("<br />");
|
|
|
|
|
2009-04-18 21:57:32 +00:00
|
|
|
include("graphs/netstats.inc.php");
|
|
|
|
include("graphs/uptime.inc.php");
|
2008-09-03 20:04:34 +00:00
|
|
|
|
2008-04-03 21:52:59 +00:00
|
|
|
break;
|
2008-03-20 11:53:19 +00:00
|
|
|
|
2009-11-28 09:48:23 +00:00
|
|
|
case "screenos":
|
2008-03-20 11:53:19 +00:00
|
|
|
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");
|
2008-09-03 20:04:34 +00:00
|
|
|
|
|
|
|
|
2009-04-18 21:57:32 +00:00
|
|
|
include("graphs/netstats.inc.php");
|
|
|
|
include("graphs/uptime.inc.php");
|
2008-09-03 20:04:34 +00:00
|
|
|
|
2008-03-20 11:53:19 +00:00
|
|
|
break;
|
|
|
|
|
2009-11-24 23:58:56 +00:00
|
|
|
case "procurve":
|
2007-04-04 10:15:07 +00:00
|
|
|
echo("<div class=graphhead>Processor Utilisation</div>");
|
2009-10-28 13:49:37 +00:00
|
|
|
$graph_type = "device_cpu"; include ("includes/print-device-graph.php");
|
2007-04-04 10:15:07 +00:00
|
|
|
echo("<br />");
|
|
|
|
echo("<div class=graphhead>Memory Usage</div>");
|
2009-10-28 13:49:37 +00:00
|
|
|
$graph_type = "device_memory"; include ("includes/print-device-graph.php");
|
2007-04-04 10:15:07 +00:00
|
|
|
echo("<br />");
|
|
|
|
echo("<div class=graphhead>Device Uptime</div>");
|
2009-10-28 13:49:37 +00:00
|
|
|
$graph_type = "device_uptime"; include ("includes/print-device-graph.php"); break;
|
2007-04-04 10:15:07 +00:00
|
|
|
echo("<br />");
|
|
|
|
|
2010-01-04 16:39:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case "powerconnect":
|
|
|
|
echo("<div class=graphhead>Processor Utilisation</div>");
|
|
|
|
$graph_type = "device_cpu"; include ("includes/print-device-graph.php");
|
|
|
|
echo("<br />");
|
|
|
|
/*
|
|
|
|
echo("<div class=graphhead>Memory Usage</div>");
|
|
|
|
$graph_type = "device_memory"; include ("includes/print-device-graph.php");
|
|
|
|
echo("<br />");
|
|
|
|
*/
|
|
|
|
echo("<div class=graphhead>Device Uptime</div>");
|
|
|
|
$graph_type = "device_uptime"; include ("includes/print-device-graph.php"); break;
|
|
|
|
echo("<br />");
|
|
|
|
|
2009-03-23 17:32:25 +00:00
|
|
|
break;
|
2009-04-23 21:13:56 +00:00
|
|
|
case "Snom":
|
2007-04-04 10:15:07 +00:00
|
|
|
echo("<div class=graphhead>Calls</div>");
|
2009-10-28 13:49:37 +00:00
|
|
|
$graph_type = "snom_calls"; include ("includes/print-device-graph.php");
|
2007-04-04 10:15:07 +00:00
|
|
|
}
|
|
|
|
|
2009-11-28 09:48:23 +00:00
|
|
|
}
|
|
|
|
|
2007-04-04 10:15:07 +00:00
|
|
|
if($memgraph) {
|
|
|
|
echo("<img src='$memgraph'> <img src='$memgraphm'>");
|
|
|
|
}
|
|
|
|
if($storagegraph) {
|
|
|
|
echo("$storagegraph");
|
|
|
|
}
|
|
|
|
if($loadgraph) {
|
|
|
|
echo("<img src='$loadgraph'> <img src='$loadgraphm'>");
|
|
|
|
}
|
|
|
|
if($tempgraph) {
|
|
|
|
echo("<img src='$tempgraph'> <img src='$tempgraphm'>");
|
|
|
|
}
|
|
|
|
if($mailsgraph) {
|
|
|
|
echo("<img src='$mailsgraph'> <img src='$mailsgraphm'>");
|
|
|
|
}
|
|
|
|
if($mailerrorgraph) {
|
|
|
|
echo("<img src='$mailerrorgraph'> <img src='$mailerrorgraphm'>");
|
|
|
|
}
|
|
|
|
if($couriergraph) {
|
|
|
|
echo("<img src='$couriergraph'> <img src='$couriergraphm'>");
|
|
|
|
}
|
|
|
|
if($ahitsgraph) {
|
|
|
|
echo("<img src='$ahitsgraph'> <img src='$ahitsgraphm'>");
|
|
|
|
}
|
|
|
|
if($abitsgraph) {
|
|
|
|
echo("<img src='$abitsgraph'> <img src='$abitsgraphm'>");
|
|
|
|
}
|
|
|
|
if($usersgraph) {
|
|
|
|
echo("<img src='$usersgraph'> <img src='$usersgraphm'>");
|
|
|
|
}
|
|
|
|
if($procsgraph) {
|
|
|
|
echo("<img src='$procsgraph'> <img src='$procsgraphm'>");
|
|
|
|
}
|
|
|
|
if($uptimegraph) {
|
|
|
|
echo("<img src='$uptimegraph'> <img src='$uptimegraphm'>");
|
|
|
|
}
|
|
|
|
echo("</div>");
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|