mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
device: Added Mikrotik POE sensors (#7883)
* Add Mikrotik POE sensors * Add Mikrotik POE sensors
This commit is contained in:
committed by
Neil Lathwood
parent
ef668f4270
commit
dbeaf3b35e
@@ -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 }}'
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user