2010-07-17 12:00:14 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-15 09:57:13 +00:00
|
|
|
if ($device['os'] == "powerconnect")
|
2010-07-17 12:00:14 +00:00
|
|
|
{
|
2012-02-14 19:00:48 +00:00
|
|
|
$temps = snmp_walk($device, "boxServicesTempSensorTemperature", "-OsqnU", "FASTPATH-BOXSERVICES-PRIVATE-MIB");
|
|
|
|
if ($debug) { echo($temps."\n"); }
|
2012-04-05 16:17:41 +00:00
|
|
|
|
2012-02-14 19:00:48 +00:00
|
|
|
$index = 0;
|
|
|
|
foreach (explode("\n",$temps) as $oids)
|
2010-07-17 12:00:14 +00:00
|
|
|
{
|
|
|
|
echo("Powerconnect ");
|
|
|
|
list($oid,$current) = explode(' ',$oids);
|
2010-07-29 18:25:11 +00:00
|
|
|
$divisor = "1";
|
|
|
|
$multiplier = "1";
|
2010-07-17 12:00:14 +00:00
|
|
|
$type = "powerconnect";
|
2012-02-14 19:00:48 +00:00
|
|
|
$index++;
|
2010-07-17 12:00:14 +00:00
|
|
|
$descr = "Internal Temperature";
|
2012-02-14 19:00:48 +00:00
|
|
|
if (count(explode("\n",$temps)) > 1) { $descr .= " $index"; }
|
2011-03-15 09:57:13 +00:00
|
|
|
|
2011-05-04 11:04:19 +00:00
|
|
|
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
|
2010-07-17 12:00:14 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-04 12:58:57 +00:00
|
|
|
?>
|