mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@ -2,7 +2,7 @@
|
||||
|
||||
global $valid_temp;
|
||||
|
||||
echo("ENTITY-SENSOR");
|
||||
echo("ENTITY-SENSOR ");
|
||||
|
||||
$oids = array();
|
||||
|
||||
@ -22,7 +22,12 @@ 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"; }
|
||||
|
||||
discover_temperature($valid_temp, $device, $oid, $index, "entity-sensor", $descr, $divisor, NULL, NULL, $current);
|
||||
|
Reference in New Issue
Block a user