device: Added Mikrotik POE sensors (#7883)

* Add Mikrotik POE sensors

* Add Mikrotik POE sensors
This commit is contained in:
Martin Zatloukal
2017-12-09 19:53:40 +00:00
committed by Neil Lathwood
parent ef668f4270
commit dbeaf3b35e
2 changed files with 25 additions and 2 deletions
+24 -1
View File
@@ -18,6 +18,13 @@ modules:
divisor: 1000
descr: mtxrOpticalName
index: 'mtxrOpticalSupplyVoltage.{{ $index }}'
-
oid: mtxrPOETable
value: mtxrPOEVoltage
num_oid: .1.3.6.1.4.1.14988.1.1.15.1.1.4.
divisor: 10
descr: '{{ $mtxrPOEName }} POE'
index: 'mtxrPOEVoltage.{{ $index }}'
current:
data:
-
@@ -27,6 +34,13 @@ modules:
divisor: 1000
descr: '{{ $mtxrOpticalName }} Tx'
index: 'mtxrOpticalTxBiasCurrent.{{ $index }}'
-
oid: mtxrPOETable
value: mtxrPOECurrent
num_oid: .1.3.6.1.4.1.14988.1.1.15.1.1.5.
divisor: 10
descr: '{{ $mtxrPOEName }} POE'
index: 'mtxrPOECurrent.{{ $index }}'
dbm:
data:
-
@@ -66,4 +80,13 @@ modules:
states:
- { descr: no, graph: 1, value: 0, generic: 0 }
- { descr: yes, graph: 1, value: 1, generic: 2 }
- { descr: 'null', graph: 1, value: 2, generic: 3 }
- { descr: 'null', graph: 1, value: 2, generic: 3 }
power:
data:
-
oid: mtxrPOETable
value: mtxrPOEPower
num_oid: .1.3.6.1.4.1.14988.1.1.15.1.1.6.
divisor: 10
descr: '{{ $mtxrPOEName }} POE'
index: 'mtxrPOEPower.{{ $index }}'
+1 -1
View File
@@ -592,7 +592,7 @@ function snmpwalk_group($device, $oid, $mib = '', $depth = 1, $array = array())
$line = strtok($data, "\n");
while ($line !== false) {
if (str_contains($line, 'at this OID')) {
if (str_contains($line, 'at this OID')||str_contains($line, 'this MIB View')) {
$line = strtok("\n");
continue;
}