mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
a billion changes. **** MAKE SURE TO UPDATE DATABASE AND RUN poll-os.php AND discovery.php -h all **** This is VERY important, as a lot of things have changed! Expect missing files, and another update soon!
git-svn-id: http://www.observium.org/svn/observer/trunk@531 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -7,28 +7,24 @@ while($device = mysql_fetch_array($device_query)) {
|
||||
|
||||
echo("<div style='clear: both;'>");
|
||||
|
||||
$os = strtolower(str_replace(" ", "_", $device['os']));
|
||||
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");
|
||||
}
|
||||
|
||||
if($os_groups[$device[os]]) {$os_group = $os_groups[$device[os]];}
|
||||
|
||||
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 {
|
||||
|
||||
|
||||
|
||||
switch ($device['os']) {
|
||||
case "JunOS":
|
||||
echo("<div class=graphhead>Processor Utilisation</div>");
|
||||
$graph_type = "device_cpu"; include ("includes/print-device-graph.php");
|
||||
if(mysql_result(mysql_query("SELECT count(*) FROM temperature WHERE temp_host = '" . $device['device_id'] . "'"),0)) {
|
||||
echo("<div class=graphhead>Temperatures</div>");
|
||||
$graph_type = "dev_temperatures"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
}
|
||||
|
||||
include("graphs/netstats.inc.php");
|
||||
include("graphs/uptime.inc.php");
|
||||
|
||||
break;
|
||||
|
||||
|
||||
case "Fortigate":
|
||||
case "fortigate":
|
||||
echo("<div class=graphhead>Processor Utilisation</div>");
|
||||
$graph_type = "fortigate_cpu"; include ("includes/print-device-graph.php");
|
||||
echo("<div class=graphhead>Memory Usage</div>");
|
||||
@@ -41,7 +37,7 @@ while($device = mysql_fetch_array($device_query)) {
|
||||
|
||||
break;
|
||||
|
||||
case "BCM96348":
|
||||
case "bcm96348":
|
||||
echo("<div class=graphhead>ADSL Attainable Rate</div>");
|
||||
$graph_type = "adsl_rate"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
@@ -57,7 +53,7 @@ while($device = mysql_fetch_array($device_query)) {
|
||||
|
||||
break;
|
||||
|
||||
case "ScreenOS":
|
||||
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>");
|
||||
@@ -82,106 +78,14 @@ while($device = mysql_fetch_array($device_query)) {
|
||||
$graph_type = "device_uptime"; include ("includes/print-device-graph.php"); break;
|
||||
echo("<br />");
|
||||
|
||||
break;
|
||||
case "Windows":
|
||||
|
||||
echo("<div class=graphhead>CPU Usage</div>");
|
||||
$graph_type = "device_cpu";
|
||||
include ("includes/print-device-graph.php");
|
||||
|
||||
echo("<div class=graphhead>Memory Utilisation</div>");
|
||||
$graph_type = "device_memory"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
|
||||
if(mysql_result(mysql_query("SELECT count(storage_id) FROM storage WHERE host_id = '" . $device['device_id'] . "'"),0)) {
|
||||
echo("<div class=graphhead>Storage</div>");
|
||||
$graph_type = "device_hrstorage"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
}
|
||||
|
||||
if(mysql_result(mysql_query("SELECT count(*) FROM temperature WHERE temp_host = '" . $device['device_id'] . "'"),0)) {
|
||||
echo("<div class=graphhead>Temperatures</div>");
|
||||
$graph_type = "device_temperatures"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
}
|
||||
|
||||
include("graphs/netstats.inc.php");
|
||||
include("graphs/uptime.inc.php");
|
||||
|
||||
# $memgraph = memgraphWin ($device[hostname] . "-mem.rrd", $device[hostname] . "-mem.png", $day, $now, 335, 100);
|
||||
# $loadgraph = loadgraphWin ($device[hostname] . "-load.rrd", $device[hostname] . "-load.png", $day, $now, 335, 100);
|
||||
# $cpugraphm = cpugraphWin ($device[hostname] . "-cpu.rrd", $device[hostname] . "-cpu-m.png", $month, $now, 335, 100);
|
||||
# $memgraphm = memgraphWin ($device[hostname] . "-mem.rrd", $device[hostname] . "-mem-m.png", $month, $now, 335, 100);
|
||||
# $loadgraphm = loadgraphWin ($device[hostname] . "-load.rrd", $device[hostname] . "-load-m.png", $month, $now, 335, 100);
|
||||
# $usersgraph = usersgraphWin ($device[hostname] . "-sys.rrd", $device[hostname] . "-users.png", $day, $now, 335, 100);
|
||||
# $usersgraphm = usersgraphWin ($device[hostname] . "-sys.rrd", $device[hostname] . "-users-m.png", $month, $now, 335, 100);
|
||||
# $procsgraph = procsgraphWin ($device[hostname] . "-sys.rrd", $device[hostname] . "-procs.png", $day, $now, 335, 100);
|
||||
# $procsgraphm = procsgraphWin ($device[hostname] . "-sys.rrd", $device[hostname] . "-procs-m.png", $month, $now, 335, 100);
|
||||
|
||||
|
||||
break;
|
||||
case "FreeBSD":
|
||||
case "NetBSD":
|
||||
case "Linux":
|
||||
case "m0n0wall":
|
||||
case "Voswall":
|
||||
case "DragonFly":
|
||||
case "OpenBSD":
|
||||
case "pfSense":
|
||||
echo("<div class=graphhead>Processor Utilisation</div>");
|
||||
$graph_type = "device_cpu"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
if($device[os] == "m0n0wall" || $device[os] == "pfSense" || $device[os] == "Voswall" || $device[monowall]) {
|
||||
echo("<div class=graphhead>IP Statistics</div>");
|
||||
$graph_type = "device_ip"; 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;
|
||||
}
|
||||
if($device['os'] != "NetBSD") {
|
||||
echo("<div class=graphhead>Memory Utilisation</div>");
|
||||
$graph_type = "device_memory"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
}
|
||||
|
||||
if(mysql_result(mysql_query("SELECT count(storage_id) FROM storage WHERE host_id = '" . $device['device_id'] . "'"),0)) {
|
||||
echo("<div class=graphhead>Storage</div>");
|
||||
$graph_type = "device_hrstorage"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
}
|
||||
|
||||
if(mysql_result(mysql_query("SELECT count(*) FROM temperature WHERE temp_host = '" . $device['device_id'] . "'"),0)) {
|
||||
echo("<div class=graphhead>Temperatures</div>");
|
||||
$graph_type = "device_temperatures"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
}
|
||||
|
||||
include("graphs/netstats.inc.php");
|
||||
include("graphs/uptime.inc.php");
|
||||
|
||||
echo("<div class=graphhead>System Load</div>");
|
||||
$graph_type = "device_load"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
echo("<div class=graphhead>Users Logged On</div>");
|
||||
$graph_type = "device_hrusers"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
echo("<div class=graphhead>Running Processes</div>");
|
||||
$graph_type = "device_hrprocesses"; include ("includes/print-device-graph.php");
|
||||
echo("<br />");
|
||||
break;
|
||||
|
||||
case "CatOS":
|
||||
break;
|
||||
|
||||
case "IOS":
|
||||
case "IOS XE":
|
||||
break;
|
||||
case "Snom":
|
||||
echo("<div class=graphhead>Calls</div>");
|
||||
$graph_type = "snom_calls"; include ("includes/print-device-graph.php");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($memgraph) {
|
||||
echo("<img src='$memgraph'> <img src='$memgraphm'>");
|
||||
}
|
||||
|
Reference in New Issue
Block a user