mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
device: Fixed polling for state sensor on ict-pdu (#8558)
* Remove if/else for polling. Gives incorrct index. * delete ict-pdu file for state polling * Added test data
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
<?php
|
||||
|
||||
$oid_sensor = $sensor['sensor_oid'];
|
||||
|
||||
if ($oid_sensor == '.1.3.6.1.4.1.39145.10.8.1.4.0') {
|
||||
$sensor_value = trim(str_replace('"', '', $snmp_data[$oid_sensor]));
|
||||
} else {
|
||||
$sensor_value = trim(str_replace('"', '', $snmp_data[$sensor['sensor_oid'].'.0']));
|
||||
}
|
||||
1278
tests/data/ict-pdu.json
Normal file
1278
tests/data/ict-pdu.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1,70 @@
|
||||
1.3.6.1.2.1.1.1.0|4|ICT Distribution Panel
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.39145.10
|
||||
1.3.6.1.2.1.1.3.0|67|24576382
|
||||
1.3.6.1.2.1.1.4.0|4|<private>
|
||||
1.3.6.1.2.1.1.5.0|4|<private>
|
||||
1.3.6.1.2.1.1.6.0|4|<private>
|
||||
1.3.6.1.4.1.39145.10.1.0|4|ICT180S-12BRCP
|
||||
1.3.6.1.4.1.39145.10.4.0|4|2.08
|
||||
1.3.6.1.4.1.39145.10.6.0|4|46.0
|
||||
1.3.6.1.4.1.39145.10.7.0|4|0.2
|
||||
1.3.6.1.4.1.39145.10.8.1.1.0|2|0
|
||||
1.3.6.1.4.1.39145.10.8.1.1.1|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.1.2|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.1.3|2|3
|
||||
1.3.6.1.4.1.39145.10.8.1.1.4|2|4
|
||||
1.3.6.1.4.1.39145.10.8.1.1.5|2|5
|
||||
1.3.6.1.4.1.39145.10.8.1.1.6|2|6
|
||||
1.3.6.1.4.1.39145.10.8.1.1.7|2|7
|
||||
1.3.6.1.4.1.39145.10.8.1.1.8|2|8
|
||||
1.3.6.1.4.1.39145.10.8.1.1.9|2|9
|
||||
1.3.6.1.4.1.39145.10.8.1.1.10|2|10
|
||||
1.3.6.1.4.1.39145.10.8.1.1.11|2|11
|
||||
1.3.6.1.4.1.39145.10.8.1.2.0|4|test
|
||||
1.3.6.1.4.1.39145.10.8.1.2.1|4|test2
|
||||
1.3.6.1.4.1.39145.10.8.1.2.2|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.2.3|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.2.4|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.2.5|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.2.6|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.2.7|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.2.8|4|Camera
|
||||
1.3.6.1.4.1.39145.10.8.1.2.9|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.2.10|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.2.11|4x|00
|
||||
1.3.6.1.4.1.39145.10.8.1.3.0|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.1|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.2|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.3|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.4|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.5|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.6|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.7|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.8|4|0.2
|
||||
1.3.6.1.4.1.39145.10.8.1.3.9|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.10|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.3.11|4|0.0
|
||||
1.3.6.1.4.1.39145.10.8.1.4.0|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.1|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.2|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.3|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.4|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.5|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.6|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.7|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.8|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.9|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.10|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.4.11|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.5.0|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.5.1|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.5.2|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.5.3|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.5.4|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.5.5|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.5.6|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.5.7|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.5.8|2|1
|
||||
1.3.6.1.4.1.39145.10.8.1.5.9|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.5.10|2|2
|
||||
1.3.6.1.4.1.39145.10.8.1.5.11|2|2
|
||||
|
||||
Reference in New Issue
Block a user