diff --git a/discover-cisco-temp.php b/discover-cisco-temp.php index c85315b84..5a6c27b5c 100755 --- a/discover-cisco-temp.php +++ b/discover-cisco-temp.php @@ -5,7 +5,7 @@ include("includes/functions.php"); $device_query = mysql_query("SELECT * FROM `devices` WHERE `os` = 'IOS' AND `status` = '1'"); while ($device = mysql_fetch_array($device_query)) { - $id = $device['id']; + $id = $device['device_id']; $hostname = $device['hostname']; $community = $device['community']; echo("Detecting IOS temperature sensors for $hostname\n"); diff --git a/discover-temperatures.php b/discover-temperatures.php index b5a68b2a1..39f4d157f 100755 --- a/discover-temperatures.php +++ b/discover-temperatures.php @@ -69,14 +69,13 @@ while ($sensor = mysql_fetch_array($query)) { $i = 0; while ($i < count($temp_exists) && !$exists) { $thistemp = $sensor['temp_host'] . " " . $sensor['temp_oid']; - if ($temp_exists[$i] == $thistemp) { $exists = 1; echo("Match!"); } + if ($temp_exists[$i] == $thistemp) { $exists = 1; } $i++; - echo("$temp_exists[$i] == $thistemp \n"); } if(!$exists) { echo("Deleting...\n"); -# mysql_query("DELETE FROM temperature WHERE temp_id = '" . $sensor['temp_id'] . "'"); + mysql_query("DELETE FROM temperature WHERE temp_id = '" . $sensor['temp_id'] . "'"); } diff --git a/html/graph.php b/html/graph.php index eb34be280..a8c9029d4 100644 --- a/html/graph.php +++ b/html/graph.php @@ -58,8 +58,11 @@ case 'uptime': $graph = uptimegraph ($hostname . "-uptime.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical); break; + case 'unixfs_dev': + $graph = unixfsgraph_dev ($device_id, $graphfile, $from, $to, $width, $height, $title, $vertical); + break; case 'unixfs': - $graph = unixfsgraph ($device_id, $graphfile, $from, $to, $width, $height, $title, $vertical); + $graph = unixfsgraph ($_GET['id'], $graphfile, $from, $to, $width, $height, $title, $vertical); break; case 'calls': $graph = callsgraphSNOM ($hostname . "-data.rrd", $graphfile, $from, $to, $width, $height, $title, $vertical); @@ -90,7 +93,10 @@ } break; case 'temp': - $graph = temp_graph ($device_id, $graphfile, $from, $to, $width, $height, $title, $vertical); + $graph = temp_graph ($_GET['id'], $graphfile, $from, $to, $width, $height, $title, $vertical); + break; + case 'dev_temp': + $graph = temp_graph_dev ($device_id, $graphfile, $from, $to, $width, $height, $title, $vertical); break; case 'mem': if($os == "Linux" || $os == "FreeBSD" || $os == "DragonFly" || $os == "OpenBSD" || $os == "NetBSD" ) { diff --git a/html/includes/print-interface-graphs.php b/html/includes/print-interface-graphs.php index 145e93938..ab752c116 100644 --- a/html/includes/print-interface-graphs.php +++ b/html/includes/print-interface-graphs.php @@ -1,15 +1,15 @@ ', LEFT);\" onmouseout=\"return nd();\"> diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php index 60f35a805..7e887dc58 100644 --- a/html/includes/print-menubar.php +++ b/html/includes/print-menubar.php @@ -76,14 +76,14 @@ echo("
Locations
Interfaces
+
Ports
Alerts ($interface_alerts)");
}
-
?>
-
-
|
Temperatures
ConfigurationStorage
"); echo("| Mountpoint | Usage | % | Total | Used |
| " . $drive['hrStorageDescr'] . " | ||||
| " . $drive['hrStorageDescr'] . " | " . $perc . "% | " . $total . " | " . $used . " |
| $ifalias - $hostname $ifname | |
| "); + | " . $data['ifAlias'] . " + " . $data['hostname'] . " " . $data['ifDescr'] . " |
| "); -if(file_exists("rrd/" . $hostname . ".". $ifIndex . ".rrd")) { +if(file_exists("rrd/" . $data['hostname'] . "." . $data['ifIndex'] . ".rrd")) { $graph_type = "bits"; + $iid = $data['interface_id']; include("includes/print-interface-graphs.php"); } diff --git a/includes/functions.php b/includes/functions.php index 2a33f5cd2..99dada22c 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -7,6 +7,8 @@ include("windows.php"); include("procurve.php"); include("snom.php"); include("graphing.php"); +include("print-functions.php"); + function formatStorage($size) { $sizes = Array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); diff --git a/includes/graphing.php b/includes/graphing.php index 81d6d0b92..c57e9eddd 100644 --- a/includes/graphing.php +++ b/includes/graphing.php @@ -1,6 +1,54 @@ |