2010-07-03 17:02:39 +00:00
|
|
|
<?php
|
2011-03-16 17:53:20 +00:00
|
|
|
|
2011-05-13 14:44:24 +00:00
|
|
|
if (strstr($device['hardware'], "Dell"))
|
2010-07-03 17:02:39 +00:00
|
|
|
{
|
2010-12-03 15:56:57 +00:00
|
|
|
$oids = snmp_walk($device, "coolingDeviceDiscreteReading", "-Osqn", "MIB-Dell-10892");
|
2010-07-03 17:02:39 +00:00
|
|
|
$oids = trim($oids);
|
|
|
|
if ($oids) echo("Dell OMSA ");
|
2011-03-15 09:57:13 +00:00
|
|
|
foreach (explode("\n",$oids) as $oid)
|
2010-07-03 17:02:39 +00:00
|
|
|
{
|
|
|
|
$oid = substr(trim($oid), 36);
|
|
|
|
list($oid) = explode(" ", $oid);
|
|
|
|
if ($oid != "")
|
|
|
|
{
|
2010-07-09 22:38:46 +00:00
|
|
|
$descr_query = snmp_get($device, ".1.3.6.1.4.1.674.10892.1.700.20.1.8.$oid", "-Onvq", "MIB-Dell-10892");
|
2010-07-03 17:02:39 +00:00
|
|
|
$descr = trim(str_replace("\"", "", shell_exec($descr_query)));
|
|
|
|
$fulloid = ".1.3.6.1.4.1.674.10892.1.700.20.1.6.$oid";
|
2010-12-03 15:56:57 +00:00
|
|
|
$temp = snmp_get($device, $fulloid, "-Oqv");
|
2011-03-15 09:57:13 +00:00
|
|
|
|
2011-05-04 11:04:19 +00:00
|
|
|
discover_sensor($valid['sensor'], 'temperature', $device, $fulloid, $oid, 'dell', $descr, '10', '1', NULL, NULL, NULL, NULL, $temp);
|
2010-07-03 17:02:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-05-04 12:58:57 +00:00
|
|
|
?>
|