clean up entity sensor names

git-svn-id: http://www.observium.org/svn/observer/trunk@1422 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-07-18 19:43:11 +00:00
parent f2a7f9638b
commit deb7fa8081

View File

@ -2,7 +2,7 @@
global $valid_temp;
echo("ENTITY-SENSOR");
echo("ENTITY-SENSOR ");
$oids = array();
@ -22,6 +22,11 @@ if(is_array($oids[$device['device_id']]))
$descr = snmp_get($device, "entPhysicalDescr.".$index, "-Oqv", "ENTITY-SENSOR-MIB");
$oid = ".1.3.6.1.2.1.99.1.1.1.4.".$index;
$current = $entry['entPhySensorValue'];
#ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay.11 = STRING: "C"
$descr = str_replace("temperature", "", $descr);
$descr = str_replace("temp", "", $descr);
$descr = str_replace("sensor", "", $descr);
if($entry['entPhySensorScale'] == "milli") { $divisor = "1000"; } else { $divisor = "1"; }