Skip to content

Commit

Permalink
Fix polling current on ICT2000DB-12IRC (#12529)
Browse files Browse the repository at this point in the history
* Update ict-pdu.inc.php

Lines 7&8 fixes an issue seen when polling current on ICT2000DB-12IRC .

* Create ict-pdu_ict200db-12irc.snmprec

* More generic fix

* Create ict-pdu_ict200db-12irc.json

* Update ict-pdu.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
  • Loading branch information
tikitaru and murrant committed Aug 21, 2021
1 parent 1de372c commit 500a699
Show file tree
Hide file tree
Showing 4 changed files with 742 additions and 651 deletions.
9 changes: 2 additions & 7 deletions includes/polling/sensors/current/ict-pdu.inc.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<?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']));
}
// some sensors return data incorrectly appending a .0
$sensor_value = $snmp_data[$sensor['sensor_oid']] ?? $snmp_data[$sensor['sensor_oid'] . '.0'];
Loading

0 comments on commit 500a699

Please sign in to comment.