add FASTPATB-BOXSERVICES-MIB, poll by name now instead of OID, provision for multiple temperature sensors, device has many, MIB currently shows only one.. sigh

git-svn-id: http://www.observium.org/svn/observer/trunk@2862 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2012-02-14 19:00:48 +00:00
parent 5edc32376b
commit ff0f27a9fa
2 changed files with 437 additions and 4 deletions
@@ -2,17 +2,20 @@
if ($device['os'] == "powerconnect")
{
$oids = snmp_get($device, ".1.3.6.1.4.1.674.10895.5000.2.6132.1.1.43.1.8.1.4.0", "-OsqnU", "");
if ($debug) { echo($oids."\n"); }
if ($oids)
$temps = snmp_walk($device, "boxServicesTempSensorTemperature", "-OsqnU", "FASTPATH-BOXSERVICES-PRIVATE-MIB");
if ($debug) { echo($temps."\n"); }
$index = 0;
foreach (explode("\n",$temps) as $oids)
{
echo("Powerconnect ");
list($oid,$current) = explode(' ',$oids);
$divisor = "1";
$multiplier = "1";
$type = "powerconnect";
$index = "0";
$index++;
$descr = "Internal Temperature";
if (count(explode("\n",$temps)) > 1) { $descr .= " $index"; }
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
}