diff --git a/discovery.php b/discovery.php index ceba913eb..963c8dce7 100755 --- a/discovery.php +++ b/discovery.php @@ -67,7 +67,7 @@ if (file_exists('.svn')) include("fix-events.php"); ## Fix events table (needs to copy some data around, so needs script) } - if($db_rev+0 < 1656) { //FIXME + if($db_rev+0 < 1656) { include('fix-port-rrd.php'); ## Rewrites all port RRDs. Nothing will work without this after 1656 } diff --git a/html/includes/graphs/device/mempools.inc.php b/html/includes/graphs/device/mempools.inc.php index d44475820..7890f5c07 100644 --- a/html/includes/graphs/device/mempools.inc.php +++ b/html/includes/graphs/device/mempools.inc.php @@ -8,12 +8,12 @@ include("includes/graphs/common.inc.php"); $rrd_options .= " -u 100 -l 0 -E -b 1024 "; $iter = "1"; $i=1; -$rrd_options .= " COMMENT:' Cur Max\\n'"; +$rrd_options .= " COMMENT:' Min Cur Max\\n'"; while($mempool = mysql_fetch_array($query)) { if($iter=="1") {$colour="CC0000";} elseif($iter=="2") {$colour="008C00";} elseif($iter=="3") {$colour="4096EE"; } elseif($iter=="4") {$colour="73880A";} elseif($iter=="5") {$colour="D01F3C";} elseif($iter=="6") {$colour="36393D"; } elseif($iter=="7") {$colour="FF0084"; unset($iter); } - $descr = substr(str_pad(short_hrDeviceDescr($mempool['mempool_descr']), 28),0,28); + $descr = substr(str_pad(short_hrDeviceDescr($mempool['mempool_descr']), 22),0,22); $descr = str_replace(":", "\:", $descr); $rrd_filename = $config['rrd_dir'] . "/".$device['hostname']."/" . safename("mempool-".$mempool['mempool_type']."-".$mempool['mempool_index'].".rrd"); if(is_file($rrd_filename)) @@ -22,8 +22,9 @@ while($mempool = mysql_fetch_array($query)) { $rrd_options .= " DEF:mempoolused$i=$rrd_filename:used:AVERAGE "; $rrd_options .= " CDEF:mempooltotal$i=mempoolused$i,mempoolused$i,mempoolfree$i,+,/,100,* "; $rrd_options .= " LINE1:mempooltotal$i#" . $colour . ":'" . $descr . "' "; - $rrd_options .= " GPRINT:mempooltotal$i:LAST:%3.0lf"; - $rrd_options .= " GPRINT:mempooltotal$i:MAX:%3.0lf\\\l "; + $rrd_options .= " GPRINT:mempooltotal$i:MIN:%3.0lf%%"; + $rrd_options .= " GPRINT:mempooltotal$i:LAST:%3.0lf%%"; + $rrd_options .= " GPRINT:mempooltotal$i:MAX:%3.0lf%%\\\l "; $iter++; $i++; } } diff --git a/html/includes/graphs/device/storage.inc.php b/html/includes/graphs/device/storage.inc.php index e3d18b384..d434ab6e8 100644 --- a/html/includes/graphs/device/storage.inc.php +++ b/html/includes/graphs/device/storage.inc.php @@ -9,7 +9,7 @@ $device = device_by_id_cache($id); $iter = "1"; $sql = mysql_query("SELECT * FROM storage where device_id = '$id'"); - $rrd_options .= " COMMENT:' Size Used %age\\l'"; + $rrd_options .= " COMMENT:' Size Used %age\\l'"; while($storage = mysql_fetch_array($sql)) { if($iter=="1") {$colour="CC0000";} elseif($iter=="2") {$colour="008C00";} elseif($iter=="3") {$colour="4096EE"; } elseif($iter=="4") {$colour="73880A";} elseif($iter=="5") {$colour="D01F3C";} elseif($iter=="6") {$colour="36393D"; diff --git a/includes/discovery/entity-sensor.inc.php b/includes/discovery/entity-sensor.inc.php index bf7b04749..a76939309 100644 --- a/includes/discovery/entity-sensor.inc.php +++ b/includes/discovery/entity-sensor.inc.php @@ -2,7 +2,7 @@ global $valid_sensor; -echo(" ENTITY-SENSOR"); +echo(" ENTITY-SENSOR "); echo("\nCaching OIDs:"); diff --git a/includes/discovery/fanspeeds/supermicro.inc.php b/includes/discovery/fanspeeds/supermicro.inc.php index c06debd35..3c07a7d28 100644 --- a/includes/discovery/fanspeeds/supermicro.inc.php +++ b/includes/discovery/fanspeeds/supermicro.inc.php @@ -26,7 +26,7 @@ if ($device['os'] == "linux") $monitor_oid = "1.3.6.1.4.1.10876.2.1.1.1.1.10.$index"; $descr = snmp_get($device, $descr_oid, "-Oqv", "SUPERMICRO-HEALTH-MIB"); $current = snmp_get($device, $fan_oid, "-Oqv", "SUPERMICRO-HEALTH-MIB"); - $limit = snmp_get($device, $limit_oid, "-Oqv", "SUPERMICRO-HEALTH-MIB"); + $low_limit = snmp_get($device, $limit_oid, "-Oqv", "SUPERMICRO-HEALTH-MIB"); #$divisor = snmp_get($device, $divisor_oid, "-Oqv", "SUPERMICRO-HEALTH-MIB"); # ^ This returns an incorrect precision. At least using the raw value... I think. -TL $divisor = "1"; @@ -35,7 +35,7 @@ if ($device['os'] == "linux") $descr = str_replace(' Speed','',$descr); if ($monitor == 'true') { - discover_sensor($valid_sensor, 'fanspeed', $device, $fan_oid, $index, 'supermicro', $descr, $divisor, '1', NULL, NULL, NULL, NULL, $current); + discover_sensor($valid_sensor, 'fanspeed', $device, $fan_oid, $index, 'supermicro', $descr, $divisor, '1', $low_limit, NULL, NULL, NULL, $current); } } } diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index 887ef032d..691704e0d 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -1,7 +1,7 @@