librenms/includes/discovery/temperatures/zyxel-ies.inc.php
Adam Amstrong 7cd3dc86ec fix temperature and processors discovery
git-svn-id: http://www.observium.org/svn/observer/trunk@2238 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-04 12:58:57 +00:00

27 lines
820 B
PHP

<?php
if ($device['os'] == 'ies')
{
echo("ZyXEL IES ");
$oids = array();
$oids = snmpwalk_cache_multi_oid($device, "accessSwitchSysTempCurValue", $oids, "ZYXEL-AS-MIB");
$oids = snmpwalk_cache_multi_oid($device, "accessSwitchSysTempHighThresh", $oids, "ZYXEL-AS-MIB");
if (is_array($oids))
{
foreach ($oids as $index => $entry)
{
$entPhysicalIndex = $index;
$descr = trim(snmp_get($device, "accessSwitchSysTempDescr.".$index, "-Oqv", "ZYXEL-AS-MIB"),'"');
$oid = ".1.3.6.1.4.1.890.1.5.1.1.6.1.2.".$index;
$current = $entry['accessSwitchSysTempCurValue'];
$divisor = '1';
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'zyxel-ies', $descr, '1', '1', NULL, $entry['accessSwitchSysTempHighThresh'], NULL, NULL, $current);
}
}
}
?>