updates et al

git-svn-id: http://www.observium.org/svn/observer/trunk@503 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-11-07 02:30:38 +00:00
parent 65b8eb183e
commit 975c3a2a93
28 changed files with 303 additions and 303 deletions
+35 -12
View File
@@ -84,18 +84,41 @@ while($device = mysql_fetch_array($device_query)) {
break;
case "Windows":
echo("<div class=graphhead>CPU Usage</div>");
$graph_type = "device_cpu";
include ("includes/print-device-graph.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);
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":
@@ -124,7 +147,7 @@ while($device = mysql_fetch_array($device_query)) {
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_unixfs"; include ("includes/print-device-graph.php");
$graph_type = "device_hrstorage"; include ("includes/print-device-graph.php");
echo("<br />");
}
@@ -141,10 +164,10 @@ while($device = mysql_fetch_array($device_query)) {
$graph_type = "device_load"; include ("includes/print-device-graph.php");
echo("<br />");
echo("<div class=graphhead>Users Logged On</div>");
$graph_type = "device_users"; include ("includes/print-device-graph.php");
$graph_type = "device_hrusers"; include ("includes/print-device-graph.php");
echo("<br />");
echo("<div class=graphhead>Running Processes</div>");
$graph_type = "device_processes"; include ("includes/print-device-graph.php");
$graph_type = "device_hrprocesses"; include ("includes/print-device-graph.php");
echo("<br />");
break;
@@ -3,6 +3,9 @@
echo("<div class=graphhead>IP Statistics</div>");
$graph_type = "device_ip"; include ("includes/print-device-graph.php");
echo("<br />");
echo("<div class=graphhead>IP Fragmented Statistics</div>");
$graph_type = "device_ip_fragmented"; include ("includes/print-device-graph.php");
echo("<br />");
echo("<div class=graphhead>TCP Statistics</div>");
$graph_type = "device_tcp"; include ("includes/print-device-graph.php");
echo("<br />");
@@ -12,6 +15,9 @@
echo("<div class=graphhead>ICMP Statistics</div>");
$graph_type = "device_icmp"; include ("includes/print-device-graph.php");
echo("<br />");
echo("<div class=graphhead>ICMP Informational Statistics</div>");
$graph_type = "device_icmp_informational"; include ("includes/print-device-graph.php");
echo("<br />");
?>
-1
View File
@@ -1,5 +1,4 @@
<?php
#include("group-collectd.inc.php");
?>
+3 -4
View File
@@ -29,7 +29,7 @@ while($drive = mysql_fetch_array($query)) {
$fs_url = "?page=device&id=".$device['device_id']."&section=dev-storage";
$fs_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname']." - ".$drive['hrStorageDescr'];
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['storage_id'] . "&type=unixfs&from=$month&to=$now&width=400&height=125\'>";
$fs_popup .= "</div><img src=\'graph.php?id=" . $drive['storage_id'] . "&type=hrstorage&from=$month&to=$now&width=400&height=125\'>";
$fs_popup .= "', RIGHT, FGCOLOR, '#e5e5e5');\" onmouseout=\"return nd();\"";
$drv_colour = percent_colour($perc);
@@ -39,7 +39,7 @@ while($drive = mysql_fetch_array($query)) {
</td><td style='font-weight: bold; color: $drv_colour'>" . $perc . "%</td><td>" . $total . "</td><td>" . $used . "</td><td></td></tr>");
$graph_type = "unixfs";
$graph_type = "hrstorage";
// start temperature graphs
@@ -73,7 +73,6 @@ while($drive = mysql_fetch_array($query)) {
}
echo("</table>");
echo("</table>");
?>