mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix test regressions introduced while tests were broken (#16399)
* AuthSSOTest: clear roles cache * PollingJob: When a poller module doesn't exist, return null instead of false. Skip all other checks and disable polling in that case. * Sensors: Guess high and low limits separately as needed * Sensors: drac test psu current data was wrong, referencing the snmprec, 8 / 10 and 0 / 10 should be the values NOTE: drac is messed up and runs a billion snmp queriess for no reason * please phpstan * Sensors: limits reference old code move to "creating" * Fix gw-eydfa accidental assignment * Fix ies5000 test data now that the bad state is removed * Fix ies5000 test data part 2 * Move sensor discovery reset into discover_device() * infinera remove duplicate sensor (also a lot of trailing whitespace apparently) * Fix innovaphone bad yaml discovery * module tests should be using null when test data doesn't exist, not an empty array * When discovery or polling is not supported, dump null instead of an array. Account for nulls in testing * update ISE serial * Janitza was seemingly wrong before * Remove some private data * bgp-peers requires ipv4-addresses and ipv6-addresses for bgpPeerIface * fix polycomLens broken state sensor discovery * Raritan pdu and pdu2 test data was combined in one test file, split it out * scs-ks duplicate temperature sensor indexes * sentry3 someone tried to avoid breaking stuff but just broke things more * smartos-dcp-m fix incorrect numeric oids * ssu2000 apparently test data was wrong, must have fixed a bug in the code. * timos remove duplicate dbm sensor definitions * bgpPeerIface is working in tests now * Fix moxa-etherdevice when mibs are a bit different * xw_to_dbm negative values should return null * Update cisco test data due previous fixes/changes * One more bgpPeerIface * Add orderBy to ospf module db dumps * Remove links test data for now * Improve handling of bad data in ipv6-addresses module
This commit is contained in:
@@ -739,7 +739,15 @@ function string_to_float($value)
|
||||
*/
|
||||
function uw_to_dbm($value)
|
||||
{
|
||||
return $value <= 0 ? -60 : 10 * log10($value / 1000);
|
||||
if ($value < 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($value == 0) {
|
||||
return -60;
|
||||
}
|
||||
|
||||
return 10 * log10($value / 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -748,7 +756,15 @@ function uw_to_dbm($value)
|
||||
*/
|
||||
function mw_to_dbm($value)
|
||||
{
|
||||
return $value <= 0 ? -60 : 10 * log10($value);
|
||||
if ($value < 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($value == 0) {
|
||||
return -60;
|
||||
}
|
||||
|
||||
return 10 * log10($value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -13,7 +13,7 @@ modules:
|
||||
total: LUM-SYSINFO-MIB::sysinfoBoardMemoryTotalMem
|
||||
free: LUM-SYSINFO-MIB::sysinfoBoardMemoryFreeMem
|
||||
percent_used: LUM-SYSINFO-MIB::sysinfoBoardMemoryUsageMemPercent
|
||||
descr: '{{ LUM-SYSINFO-MIB::sysinfoBoardMemoryName }}'
|
||||
descr: '{{ LUM-SYSINFO-MIB::sysinfoBoardMemoryName }}'
|
||||
|
||||
processors:
|
||||
data:
|
||||
@@ -70,12 +70,12 @@ modules:
|
||||
states:
|
||||
- { descr: notPresent, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: down, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: equipmentBoardAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
-
|
||||
oid: equipmentBoardTable
|
||||
value: equipmentBoardTempHighExceeded
|
||||
@@ -86,7 +86,7 @@ modules:
|
||||
state_name: BoardTempHighExceeded
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: equipmentPowerTable
|
||||
@@ -98,7 +98,7 @@ modules:
|
||||
state_name: PSUOperStatus
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: equipmentFanTable
|
||||
@@ -110,7 +110,7 @@ modules:
|
||||
state_name: FanOperStatus
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
@@ -123,12 +123,12 @@ modules:
|
||||
states:
|
||||
- { descr: notPresent, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: down, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
@@ -140,12 +140,12 @@ modules:
|
||||
state_name: AmpSaturationFault
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
-
|
||||
oid: oaIfTable
|
||||
value: oaIfLaserTempOutOfRange
|
||||
@@ -156,12 +156,12 @@ modules:
|
||||
state_name: AmpTempExceeded
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
@@ -173,13 +173,13 @@ modules:
|
||||
state_name: AmpLoS
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
value: oaIfTxSignalStatus
|
||||
@@ -191,12 +191,12 @@ modules:
|
||||
states:
|
||||
- { descr: down, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: degraded, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
@@ -209,12 +209,12 @@ modules:
|
||||
states:
|
||||
- { descr: down, graph: 0, value: 1, generic: 2 }
|
||||
- { descr: degraded, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
@@ -226,12 +226,12 @@ modules:
|
||||
state_name: AmpLoS
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: oaVoaClientIfTable
|
||||
@@ -243,12 +243,12 @@ modules:
|
||||
states:
|
||||
- { descr: notPresent, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: down, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaVoaClientIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: oaVoaLineIfTable
|
||||
@@ -260,12 +260,12 @@ modules:
|
||||
states:
|
||||
- { descr: notPresent, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: down, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: oaVoaLineIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: ocmIfTable
|
||||
@@ -278,12 +278,12 @@ modules:
|
||||
states:
|
||||
- { descr: notPresent, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: down, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: ocmIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: ocmIfTable
|
||||
@@ -295,7 +295,7 @@ modules:
|
||||
state_name: OCMSwitch
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: ocmIfTable
|
||||
@@ -307,7 +307,7 @@ modules:
|
||||
state_name: OCMModule
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: ifOtnOtuTable
|
||||
@@ -319,7 +319,7 @@ modules:
|
||||
state_name: OTNLoF
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: ifOtnOtuTable
|
||||
@@ -331,7 +331,7 @@ modules:
|
||||
state_name: OTNLoMF
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: ifOtnOtuTable
|
||||
@@ -343,7 +343,7 @@ modules:
|
||||
state_name: OTNIndicationSignal
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: ifOtnMonSmTable
|
||||
@@ -355,7 +355,7 @@ modules:
|
||||
state_name: OTNBDIState
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: ifOtnMonSmTable
|
||||
@@ -367,7 +367,7 @@ modules:
|
||||
state_name: OTNIAEState
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: ifOtnMonSmTable
|
||||
@@ -379,7 +379,7 @@ modules:
|
||||
state_name: OTNBIAEState
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
|
||||
-
|
||||
oid: wdmCtrlChannelTable
|
||||
@@ -411,12 +411,12 @@ modules:
|
||||
state_name: WDMChannelLoSStatus
|
||||
states:
|
||||
- { descr: alarm, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: ok, graph: 0, value: 1, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: wdmCtrlChannelAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: ifBasicAdminTable
|
||||
@@ -429,12 +429,12 @@ modules:
|
||||
states:
|
||||
- { descr: notPresent, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: down, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: ifBasicAdminAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
-
|
||||
oid: dcnIfTable
|
||||
@@ -446,12 +446,12 @@ modules:
|
||||
states:
|
||||
- { descr: notPresent, graph: 0, value: 1, generic: 0 }
|
||||
- { descr: down, graph: 0, value: 2, generic: 2 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
- { descr: up, graph: 0, value: 3, generic: 0 }
|
||||
skip_values:
|
||||
-
|
||||
oid: dcnIfAdminStatus
|
||||
op: '='
|
||||
value: 1
|
||||
value: 1
|
||||
|
||||
|
||||
temperature:
|
||||
@@ -466,7 +466,7 @@ modules:
|
||||
entPhysicalIndex: 'sr-{{ $index }}'
|
||||
high_limit: equipmentSubrackTempThreshold
|
||||
low_limit: 3
|
||||
|
||||
|
||||
-
|
||||
oid: equipmentBoardTable
|
||||
value: equipmentBoardTemp
|
||||
@@ -475,8 +475,8 @@ modules:
|
||||
descr: 'Temperature {{ $equipmentBoardSubrack }}:{{ $equipmentBoardName }}'
|
||||
group: Board Temperature
|
||||
entPhysicalIndex: 'board-{{ $index }}'
|
||||
high_limit: equipmentBoardTempThreshold
|
||||
low_limit: equipmentBoardTempLowThreshold
|
||||
high_limit: equipmentBoardTempThreshold
|
||||
low_limit: equipmentBoardTempLowThreshold
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
@@ -484,20 +484,20 @@ modules:
|
||||
divisor: 10
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.19.2.2.1.1.43.{{ $index }}'
|
||||
descr: 'Temperature {{ $oaIfSubrack }}:{{ $oaIfName }}'
|
||||
group: Amplifier Laser Temperature
|
||||
group: Amplifier Laser Temperature
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
|
||||
-
|
||||
oid: ifPhysicalTrxTable
|
||||
value: ifPhysicalTrxLaserTemp
|
||||
divisor: 10
|
||||
divisor: 10
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.47.2.2.1.1.5.{{ $index }}'
|
||||
descr: 'Laser Temperature {{ $ifPhysicalTrxName }}'
|
||||
group: Laser Temperature
|
||||
entPhysicalIndex: 'laser-{{ $index }}'
|
||||
skip_values: [2147483646, 2147483647, -2147483648]
|
||||
entPhysicalIndex: 'laser-{{ $index }}'
|
||||
skip_values: [2147483646, 2147483647, -2147483648]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
dbm:
|
||||
@@ -505,95 +505,86 @@ modules:
|
||||
skip_values: 0
|
||||
data:
|
||||
-
|
||||
oid: oaIfTable
|
||||
oid: oaIfTable
|
||||
value: oaIfRxPowerLevel
|
||||
divisor: 10
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.19.2.2.1.1.20.{{ $index }}'
|
||||
descr: 'Amplifier Rx {{ $oaIfSubrack }}:{{ $oaIfName }}'
|
||||
group: Amplifier Laser dBm
|
||||
index: oa-rx-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
group: Amplifier Laser dBm
|
||||
index: oa-rx-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
oid: oaIfTable
|
||||
value: oaIfTxPowerLevel
|
||||
divisor: 10
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.19.2.2.1.1.19.{{ $index }}'
|
||||
descr: 'Amplifier Tx {{ $oaIfSubrack }}:{{ $oaIfName }}'
|
||||
group: Amplifier Laser dBm
|
||||
index: oa-tx-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
group: Amplifier Laser dBm
|
||||
index: oa-tx-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
oid: oaIfTable
|
||||
value: oaIfActualGain
|
||||
divisor: 10
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.19.2.2.1.1.51.{{ $index }}'
|
||||
descr: 'Amplifier Gain {{ $oaIfSubrack }}:{{ $oaIfName }}'
|
||||
group: Amplifier Laser Gain dBm
|
||||
index: oa-gain-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
group: Amplifier Laser Gain dBm
|
||||
index: oa-gain-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
|
||||
-
|
||||
oid: ifPerfL0Table
|
||||
oid: ifPerfL0Table
|
||||
value: ifPerfL0RxPower
|
||||
divisor: 10
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.56.2.6.1.1.4.{{ $index }}'
|
||||
descr: 'Laser Rx {{ $ifPerfL0Name }}'
|
||||
group: Laser dBm
|
||||
index: laser-rx-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'laser-{{ $index }}'
|
||||
skip_values: [2147483646, -2147483648]
|
||||
group: Laser dBm
|
||||
index: laser-rx-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'laser-{{ $index }}'
|
||||
skip_values: [2147483646, -2147483648]
|
||||
|
||||
-
|
||||
oid: ifPerfL0Table
|
||||
oid: ifPerfL0Table
|
||||
value: ifPerfL0TxPower
|
||||
divisor: 10
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.56.2.6.1.1.5.{{ $index }}'
|
||||
descr: 'Laser Tx {{ $ifPerfL0Name }}'
|
||||
group: Laser dBm
|
||||
index: laser-tx-dbm.{{ $index }}
|
||||
group: Laser dBm
|
||||
index: laser-tx-dbm.{{ $index }}
|
||||
entPhysicalIndex: 'laser-{{ $index }}'
|
||||
skip_values: [2147483646, -2147483648]
|
||||
skip_values: [2147483646, -2147483648]
|
||||
|
||||
current:
|
||||
data:
|
||||
-
|
||||
oid: oaIfTable
|
||||
value: oaIfLaserBias
|
||||
divisor: 10000
|
||||
divisor: 10000
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.19.2.2.1.1.22.{{ $index }}'
|
||||
descr: 'Amplifier current {{ $oaIfSubrack }}:{{ $oaIfName }}'
|
||||
group: Amplifier Laser Current
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
|
||||
-
|
||||
oid: oaIfTable
|
||||
value: oaIfLaserBias
|
||||
divisor: 10000
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.19.2.2.1.1.22.{{ $index }}'
|
||||
descr: 'Amplifier current {{ $oaIfSubrack }}:{{ $oaIfName }}'
|
||||
group: Amplifier Laser Current
|
||||
entPhysicalIndex: 'oa-{{ $index }}'
|
||||
|
||||
-
|
||||
oid: ifPhysicalTrxTable
|
||||
value: ifPhysicalTrxLaserBias
|
||||
divisor: 10000
|
||||
divisor: 10000
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.47.2.2.1.1.4.{{ $index }}'
|
||||
descr: 'Laser current {{ $ifPhysicalTrxName }}'
|
||||
group: Laser Current
|
||||
entPhysicalIndex: 'laser-{{ $index }}'
|
||||
skip_values: [2147483646, 2147483647, -2147483648, 4294967293, 4294967294, 2147483648]
|
||||
entPhysicalIndex: 'laser-{{ $index }}'
|
||||
skip_values: [2147483646, 2147483647, -2147483648, 4294967293, 4294967294, 2147483648]
|
||||
|
||||
chromatic_dispersion:
|
||||
data:
|
||||
-
|
||||
oid: ifPerfL0Table
|
||||
oid: ifPerfL0Table
|
||||
value: ifPerfL0ChromaticDispersion
|
||||
num_oid: '.1.3.6.1.4.1.8708.2.56.2.6.1.1.7.{{ $index }}'
|
||||
descr: 'Laser CD {{ $ifPerfL0Name }}'
|
||||
group: Laser Chromatic Dispersion
|
||||
index: laser-cd.{{ $index }}
|
||||
group: Laser Chromatic Dispersion
|
||||
index: laser-cd.{{ $index }}
|
||||
entPhysicalIndex: 'laser-{{ $index }}'
|
||||
skip_values: [2147483646, 2147483647, -2147483648]
|
||||
skip_values: [2147483646, 2147483647, -2147483648]
|
||||
|
@@ -36,7 +36,7 @@ modules:
|
||||
- { descr: up, graph: 0, value: 2, generic: 0 }
|
||||
-
|
||||
oid: l3Table
|
||||
value: l3Label
|
||||
value: l3Protocol
|
||||
num_oid: '.1.3.6.1.4.1.6666.1.4.1.2.{{ $index }}'
|
||||
descr: 'ISDN signaling protocol {{ $l3Label }}'
|
||||
state_name: l3Label
|
||||
@@ -53,13 +53,16 @@ modules:
|
||||
value: l3NumBchanActive
|
||||
num_oid: '.1.3.6.1.4.1.6666.1.4.1.4.{{ $index }}'
|
||||
descr: 'Active calls {{ $l3Label }}'
|
||||
index: 'l3NumBchanActive.{{ $index }}'
|
||||
-
|
||||
oid: l3Table
|
||||
value: l3CallsBoot
|
||||
num_oid: '.1.3.6.1.4.1.6666.1.4.1.5.{{ $index }}'
|
||||
descr: "Calls since boot {{ $l3Label }}"
|
||||
index: 'l3CallsBoot.{{ $index }}'
|
||||
-
|
||||
oid: l3Table
|
||||
value: l3NumBchan
|
||||
num_oid: '.1.3.6.1.4.1.6666.1.4.1.3.{{ $index }}'
|
||||
descr: 'Available Channels {{ $l3Label }}'
|
||||
index: 'l3NumBchan.{{ $index }}'
|
||||
|
@@ -12,6 +12,8 @@ modules:
|
||||
value: identityStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.1.6.{{ $index }}'
|
||||
descr: 'Overall System status'
|
||||
index: "identityStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -21,6 +23,8 @@ modules:
|
||||
value: serviceH323Status
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.2.7.1.{{ $index }}'
|
||||
descr: 'H323 Status'
|
||||
index: "serviceH323Status.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -28,8 +32,10 @@ modules:
|
||||
-
|
||||
oid: serviceH323
|
||||
value: serviceH323RegistrationStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.2.7.1.{{ $index }}'
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.2.7.2.{{ $index }}'
|
||||
descr: 'H323 Status'
|
||||
index: "serviceH323RegistrationStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -39,6 +45,8 @@ modules:
|
||||
value: serviceSipStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.2.8.1.{{ $index }}'
|
||||
descr: 'Sip overall Status'
|
||||
index: "serviceSipStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -48,6 +56,8 @@ modules:
|
||||
value: serviceSipRegistrationStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.2.8.3.1.2.{{ $index }}'
|
||||
descr: 'Sip Status Line {{ $index }}'
|
||||
index: "serviceSipRegistrationStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -57,6 +67,8 @@ modules:
|
||||
value: serviceIsdnStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.2.9.1.{{ $index }}'
|
||||
descr: 'ISDN Status'
|
||||
index: "serviceIsdnStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -66,6 +78,8 @@ modules:
|
||||
value: hardwareOverallStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.3.1.{{ $index }}'
|
||||
descr: 'Hardware Status'
|
||||
index: "hardwareOverallStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -75,6 +89,8 @@ modules:
|
||||
value: hardwareMicrophoneStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.3.5.1.{{ $index }}'
|
||||
descr: 'Microphone Status'
|
||||
index: "hardwareMicrophoneStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -84,6 +100,8 @@ modules:
|
||||
value: hardwareCameraStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.3.6.1.{{ $index }}'
|
||||
descr: 'Camera Status'
|
||||
index: "hardwareCameraStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -93,6 +111,8 @@ modules:
|
||||
value: hardwareNICStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.3.10.1.{{ $index }}'
|
||||
descr: 'NIC Status'
|
||||
index: "hardwareNICStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -102,6 +122,8 @@ modules:
|
||||
value: hardwarePTCStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.3.11.1.{{ $index }}'
|
||||
descr: 'PTC Status'
|
||||
index: "hardwarePTCStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -111,6 +133,8 @@ modules:
|
||||
value: hardwareUcBoardStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.3.12.1.{{ $index }}'
|
||||
descr: 'Uc Board Status'
|
||||
index: "hardwareUcBoardStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -120,6 +144,8 @@ modules:
|
||||
value: externalIntegrationPresenceStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.6.7.1.{{ $index }}'
|
||||
descr: 'Poly Presence Service Status'
|
||||
index: "externalIntegrationPresenceStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -129,6 +155,8 @@ modules:
|
||||
value: externalIntegrationCDRStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.6.8.1.{{ $index }}'
|
||||
descr: 'Poly CDR Service Status'
|
||||
index: "externalIntegrationCDRStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -138,6 +166,8 @@ modules:
|
||||
value: externalIntegrationSyslogStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.6.9.1.{{ $index }}'
|
||||
descr: 'Syslog Service Status'
|
||||
index: "externalIntegrationSyslogStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -147,6 +177,8 @@ modules:
|
||||
value: externalIntegrationSoftwareUpdateStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.6.10.1.{{ $index }}'
|
||||
descr: 'Poly Software Update Status'
|
||||
index: "externalIntegrationSoftwareUpdateStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -156,6 +188,8 @@ modules:
|
||||
value: externalIntegrationProvisioningStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.6.11.1.{{ $index }}'
|
||||
descr: 'Poly Provisioning Status'
|
||||
index: "externalIntegrationProvisioningStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -165,6 +199,8 @@ modules:
|
||||
value: externalIntegrationExchangeStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.6.12.1.{{ $index }}'
|
||||
descr: 'Exchange Integration Status'
|
||||
index: "externalIntegrationExchangeStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
@@ -174,7 +210,9 @@ modules:
|
||||
value: externalIntegrationDirectorySvcsStatus
|
||||
num_oid: '.1.3.6.1.4.1.13885.101.1.6.13.1.{{ $index }}'
|
||||
descr: 'Directory Integration Status'
|
||||
index: "externalIntegrationDirectorySvcsStatus.{{ $index }}"
|
||||
state_name: polycomEndpointGeneric
|
||||
states:
|
||||
- { value: 1, descr: disabled, graph: 1, generic: 3 }
|
||||
- { value: 2, descr: ok, graph: 1, generic: 0 }
|
||||
- { value: 3, descr: failed, graph: 1, generic: 2 }
|
||||
- { value: 3, descr: failed, graph: 1, generic: 2 }
|
||||
|
@@ -8,6 +8,7 @@ modules:
|
||||
value: exhaust-air-temperature
|
||||
num_oid: '.1.3.6.1.4.1.9839.1.2.15.{{ $index }}'
|
||||
descr: 'Exhaust air temperature'
|
||||
index: "exhaust.{{ $index }}"
|
||||
divisor: 10
|
||||
|
||||
-
|
||||
@@ -15,6 +16,7 @@ modules:
|
||||
value: supply-air-temperature
|
||||
num_oid: '.1.3.6.1.4.1.9839.1.2.16.{{ $index }}'
|
||||
descr: 'Supply air temperature'
|
||||
index: "supply.{{ $index }}"
|
||||
divisor: 10
|
||||
|
||||
-
|
||||
@@ -22,6 +24,7 @@ modules:
|
||||
value: outside-air-temperature
|
||||
num_oid: '.1.3.6.1.4.1.9839.1.2.17.{{ $index }}'
|
||||
descr: 'Outside air temperature'
|
||||
index: "outside.{{ $index }}"
|
||||
divisor: 10
|
||||
|
||||
-
|
||||
@@ -29,6 +32,7 @@ modules:
|
||||
value: room-temperature
|
||||
num_oid: '.1.3.6.1.4.1.9839.1.2.18.{{ $index }}'
|
||||
descr: 'Room temperature'
|
||||
index: "room.{{ $index }}"
|
||||
divisor: 10
|
||||
|
||||
humidity:
|
||||
|
@@ -17,11 +17,11 @@ modules:
|
||||
value: infeedLoadValue
|
||||
num_oid: '.1.3.6.1.4.1.1718.3.2.2.1.7.{{ $index }}'
|
||||
descr: infeedName
|
||||
index: 'infeedID.{{ $index }}'
|
||||
index: 'infeedID.{{ $index }}'
|
||||
## limits need to be excluded from the divisor somehow
|
||||
#warn_limit: infeedLoadHighThresh
|
||||
#high_limit: infeedCapacity
|
||||
|
||||
|
||||
- oid: outletTable
|
||||
value: outletLoadValue
|
||||
num_oid: '.1.3.6.1.4.1.1718.3.2.3.1.7.{{ $index }}'
|
||||
@@ -32,7 +32,6 @@ modules:
|
||||
#warn_limit: outletLoadHighThresh
|
||||
#high_limit: outputCapacity
|
||||
voltage:
|
||||
# note: this is configured, not measured
|
||||
options:
|
||||
divisor: 10
|
||||
skip_value_lt: 0
|
||||
@@ -44,7 +43,7 @@ modules:
|
||||
# recording voltage for additional feeds (3-phase)
|
||||
# would require reindexing and moving RRD files;
|
||||
# this is a configured value, not measured.
|
||||
index: '{{ $subindex0 }}'
|
||||
# ^ yeah, you broke it anyway by setting "index: '{{ $subindex0 }}'"
|
||||
group: 'Configured Voltage'
|
||||
power:
|
||||
options:
|
||||
|
@@ -7,7 +7,7 @@ modules:
|
||||
data:
|
||||
-
|
||||
oid: dcpInterfaceTable
|
||||
num_oid: '.1.3.6.1.4.1.30826.2.2.2.1.1.1.5.{{ $index }}'
|
||||
num_oid: '.1.3.6.1.4.1.30826.2.2.1.1.1.1.5.{{ $index }}'
|
||||
value: dcpInterfaceStatus
|
||||
descr: '{{ $dcpInterfaceName }}'
|
||||
index: 'dcpInterfaceStatus.{{ $index }}'
|
||||
@@ -18,7 +18,7 @@ modules:
|
||||
- { value: 3, generic: 0, graph: 1, descr: up }
|
||||
-
|
||||
oid: dcpLinkviewTable
|
||||
num_oid: '.1.3.6.1.4.1.30826.2.2.2.1.1.1.5.{{ $index }}'
|
||||
num_oid: '.1.3.6.1.4.1.30826.2.2.3.1.1.1.4.{{ $index }}'
|
||||
value: dcpLinkviewLocalStatus
|
||||
descr: '{{ $dcpLinkviewLocalName }} - {{ $dcpLinkviewRemoteName }}'
|
||||
index: 'dcpLinkviewLocalStatus.{{ $index }}'
|
||||
|
@@ -216,10 +216,12 @@ modules:
|
||||
op: '='
|
||||
value: 2
|
||||
-
|
||||
oid: tmnxDigitalDiagMonitorEntry
|
||||
oid: tmnxDigitalDiagMonitorTable
|
||||
value: tmnxDDMTemperature
|
||||
num_oid: '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.1.{{ $index }}'
|
||||
descr: '{{ ifName:1 }}'
|
||||
entPhysicalIndex: '{{ $subindex1 }}'
|
||||
entPhysicalIndex_measured: ports
|
||||
index: '{{ $index }}'
|
||||
high_limit: tmnxDDMTempHiAlarm
|
||||
warn_limit: tmnxDDMTempHiWarning
|
||||
@@ -238,11 +240,11 @@ modules:
|
||||
current:
|
||||
data:
|
||||
-
|
||||
oid: tmnxDigitalDiagMonitorEntry
|
||||
oid: tmnxDigitalDiagMonitorTable
|
||||
value: tmnxDDMTxBiasCurrent
|
||||
num_oid: '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.11.{{ $index }}'
|
||||
descr: '{{ ifName:1 }} Tx Bias'
|
||||
entPhysicalIndex: '{{ $index }}'
|
||||
entPhysicalIndex: '{{ $subindex1 }}'
|
||||
entPhysicalIndex_measured: ports
|
||||
index: 'tx-bias-{{ $index }}'
|
||||
divisor: 500000
|
||||
@@ -264,7 +266,7 @@ modules:
|
||||
value: tmnxDDMLaneTxBiasCurrent
|
||||
num_oid: '.1.3.6.1.4.1.6527.3.1.2.2.4.66.1.7.{{ $index }}'
|
||||
descr: '{{ ifName:1 }} Lane {{ $subindex2 }} Tx Bias'
|
||||
entPhysicalIndex: '{{ $index }}'
|
||||
entPhysicalIndex: '{{ $subindex1 }}'
|
||||
entPhysicalIndex_measured: ports
|
||||
index: 'tx-bias-{{ $index }}'
|
||||
divisor: 500000
|
||||
@@ -285,11 +287,11 @@ modules:
|
||||
dbm:
|
||||
data:
|
||||
-
|
||||
oid: tmnxDigitalDiagMonitorEntry
|
||||
oid: tmnxDigitalDiagMonitorTable
|
||||
value: tmnxDDMRxOpticalPower
|
||||
num_oid: '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.21.{{ $index }}'
|
||||
descr: '{{ ifName:1 }} Rx'
|
||||
entPhysicalIndex: '{{ $index }}'
|
||||
entPhysicalIndex: '{{ $subindex1 }}'
|
||||
entPhysicalIndex_measured: ports
|
||||
index: 'rx-{{ $index }}'
|
||||
divisor: 10
|
||||
@@ -309,11 +311,11 @@ modules:
|
||||
op: '>'
|
||||
value: 0
|
||||
-
|
||||
oid: tmnxDigitalDiagMonitorEntry
|
||||
oid: tmnxDigitalDiagMonitorTable
|
||||
value: tmnxDDMTxOutputPower
|
||||
num_oid: '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.16.{{ $index }}'
|
||||
descr: '{{ ifName:1 }} Tx'
|
||||
entPhysicalIndex: '{{ $index }}'
|
||||
entPhysicalIndex: '{{ $subindex1 }}'
|
||||
entPhysicalIndex_measured: ports
|
||||
index: 'tx-{{ $index }}'
|
||||
divisor: 10
|
||||
@@ -337,7 +339,7 @@ modules:
|
||||
value: tmnxDDMLaneRxOpticalPower
|
||||
num_oid: '.1.3.6.1.4.1.6527.3.1.2.2.4.66.1.17.{{ $index }}'
|
||||
descr: '{{ ifName:1 }} Lane {{ $subindex2 }} Rx'
|
||||
entPhysicalIndex: '{{ $index }}'
|
||||
entPhysicalIndex: '{{ $subindex1 }}'
|
||||
entPhysicalIndex_measured: ports
|
||||
index: 'lane-rx-{{ $index }}'
|
||||
user_func: 'uw_to_dbm'
|
||||
@@ -357,7 +359,7 @@ modules:
|
||||
value: tmnxDDMLaneTxOutputPower
|
||||
num_oid: '.1.3.6.1.4.1.6527.3.1.2.2.4.66.1.12.{{ $index }}'
|
||||
descr: '{{ ifName:1 }} Lane {{ $subindex2 }} Tx'
|
||||
entPhysicalIndex: '{{ $index }}'
|
||||
entPhysicalIndex: '{{ $subindex1 }}'
|
||||
entPhysicalIndex_measured: ports
|
||||
index: 'lane-tx-{{ $index }}'
|
||||
user_func: 'uw_to_dbm'
|
||||
@@ -375,10 +377,12 @@ modules:
|
||||
voltage:
|
||||
data:
|
||||
-
|
||||
oid: tmnxDigitalDiagMonitorEntry
|
||||
oid: tmnxDigitalDiagMonitorTable
|
||||
value: tmnxDDMSupplyVoltage
|
||||
num_oid: '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.6.{{ $index }}'
|
||||
descr: '{{ ifName:1 }}'
|
||||
entPhysicalIndex: '{{ $subindex1 }}'
|
||||
entPhysicalIndex_measured: ports
|
||||
index: '{{ $index }}'
|
||||
high_limit: tmnxDDMSupplyVoltageHiAlarm
|
||||
warn_limit: tmnxDDMSupplyVoltageHiWarning
|
||||
|
@@ -125,6 +125,9 @@ function discover_new_device($hostname, $device, $method, $interface = null)
|
||||
*/
|
||||
function discover_device(&$device, $force_module = false)
|
||||
{
|
||||
DeviceCache::setPrimary($device['device_id']);
|
||||
App::forgetInstance('sensor-discovery');
|
||||
|
||||
if ($device['snmp_disable'] == '1') {
|
||||
return true;
|
||||
}
|
||||
|
@@ -4,6 +4,8 @@ use LibreNMS\Config;
|
||||
use LibreNMS\Exceptions\InvalidIpException;
|
||||
use LibreNMS\Util\IPv6;
|
||||
|
||||
$valid ??= []; // may not be instantiated. I think this is the last place that uses this global.
|
||||
|
||||
foreach (DeviceCache::getPrimary()->getVrfContexts() as $context_name) {
|
||||
$device['context_name'] = $context_name;
|
||||
|
||||
@@ -14,6 +16,12 @@ foreach (DeviceCache::getPrimary()->getVrfContexts() as $context_name) {
|
||||
->walk(['IP-MIB::ipAddressIfIndex.ipv6', 'IP-MIB::ipAddressOrigin.ipv6', 'IP-MIB::ipAddressPrefix.ipv6'])
|
||||
->table(4);
|
||||
foreach ($oids['ipv6'] ?? [] as $address => $data) {
|
||||
if (! is_array($data)) {
|
||||
\Illuminate\Support\Facades\Log::debug('IPv6 data invalid');
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
$ifIndex = $data['IP-MIB::ipAddressIfIndex'];
|
||||
$ipv6_address = IPv6::fromHexString($address)->uncompressed();
|
||||
|
@@ -11,12 +11,9 @@
|
||||
//portName OID is based on each device model/MIB
|
||||
$oid = $device['sysObjectID'] . '.1.9.1.1.7';
|
||||
|
||||
$port_names = snmpwalk_cache_oid($device, $oid, $port_names);
|
||||
|
||||
foreach ($port_names as $oid => $value) {
|
||||
if (! empty($value['iso'])) {
|
||||
// determine index
|
||||
$index = end(explode('.', $oid));
|
||||
$port_stats[$index]['ifAlias'] = $value['iso'];
|
||||
foreach (SnmpQuery::walk($oid)->values() as $oid => $name) {
|
||||
if ($name) {
|
||||
$index = \Illuminate\Support\Str::afterLast($oid, '.');
|
||||
$port_stats[$index]['ifAlias'] = $name;
|
||||
}
|
||||
}
|
||||
|
@@ -1,49 +0,0 @@
|
||||
<?php
|
||||
|
||||
$multiplier = 1;
|
||||
$divisor = 10000;
|
||||
$user_func = 'mw_to_dbm';
|
||||
foreach ($pre_cache['timos_oids'] as $index => $entry) {
|
||||
if (is_numeric($entry['tmnxDDMRxOpticalPower']) && $entry['tmnxDDMRxOpticalPower'] != 0 && $entry['tmnxDDMTxOutputPower'] != 0) {
|
||||
$oid = '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.21.' . $index;
|
||||
$value = round(10 * log10($entry['tmnxDDMRxOpticalPower'] / $divisor), 2);
|
||||
|
||||
$int_ext = $entry['tmnxDDMExternallyCalibrated'];
|
||||
if ($int_ext == 'true') {
|
||||
$int_ext = 'Ext-Cal';
|
||||
} elseif ($int_ext == 'false') {
|
||||
$int_ext = 'Int-Cal';
|
||||
} else {
|
||||
$int_ext = 'Unknown';
|
||||
}
|
||||
|
||||
$entPhysicalIndex = $index;
|
||||
$entPhysicalIndex_measured = 'ports';
|
||||
|
||||
$limit_low = round(10 * log10($entry['tmnxDDMRxOpticalPowerLowAlarm'] / $divisor), 2);
|
||||
$warn_limit_low = round(10 * log10($entry['tmnxDDMRxOpticalPowerLowWarning'] / $divisor), 2);
|
||||
$limit = round(10 * log10($entry['tmnxDDMRxOpticalPowerHiAlarm'] / $divisor), 2);
|
||||
$warn_limit = round(10 * log10($entry['tmnxDDMRxOpticalPowerHiWarning'] / $divisor), 2);
|
||||
|
||||
$port_descr = get_port_by_index_cache($device['device_id'], str_replace('1.', '', $index));
|
||||
$descr = $port_descr['ifName'] . ' RX Power ' . $int_ext;
|
||||
|
||||
discover_sensor(null, 'dbm', $device, $oid, 'rx-' . $index, 'timos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $value, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured, $user_func);
|
||||
}
|
||||
if (is_numeric($entry['tmnxDDMTxOutputPower']) && $entry['tmnxDDMTxOutputPower'] != 0 && $entry['tmnxDDMRxOpticalPower'] != 0) {
|
||||
$oid = '.1.3.6.1.4.1.6527.3.1.2.2.4.31.1.16.' . $index;
|
||||
$value = round(10 * log10($entry['tmnxDDMTxOutputPower'] / $divisor), 2);
|
||||
$entPhysicalIndex = $index;
|
||||
$entPhysicalIndex_measured = 'ports';
|
||||
|
||||
$limit_low = round(10 * log10($entry['tmnxDDMTxOutputPowerLowAlarm'] / $divisor), 2);
|
||||
$warn_limit_low = round(10 * log10($entry['tmnxDDMTxOutputPowerLowWarning'] / $divisor), 2);
|
||||
$limit = round(10 * log10($entry['tmnxDDMTxOutputPowerHiAlarm'] / $divisor), 2);
|
||||
$warn_limit = round(10 * log10($entry['tmnxDDMTxOutputPowerHiWarning'] / $divisor), 2);
|
||||
|
||||
$port_descr = get_port_by_index_cache($device['device_id'], str_replace('1.', '', $index));
|
||||
$descr = $port_descr['ifName'] . ' TX Power';
|
||||
|
||||
discover_sensor(null, 'dbm', $device, $oid, 'tx-' . $index, 'timos', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $value, 'snmp', $entPhysicalIndex, $entPhysicalIndex_measured, $user_func);
|
||||
}
|
||||
}
|
@@ -48,7 +48,7 @@ foreach (explode("\n", $oids) as $data) {
|
||||
}
|
||||
discover_sensor(null, 'current', $device, $num_oid, $sensor_index, 'gw-eydfa', $descr, $divisor, 1, $low_limit, $low_warn, $high_warn, $high_limit, $value);
|
||||
}
|
||||
if ($split_oid[0] == 'oaPumpTEC' && $index = 1) { // Current - A
|
||||
if ($split_oid[0] == 'oaPumpTEC' && $index == 1) { // Current - A
|
||||
$divisor = 100;
|
||||
$descr = 'TEC Pump - ' . $index;
|
||||
$num_oid = '.1.3.6.1.4.1.17409.1.11.4.1.3.' . $index;
|
||||
@@ -62,7 +62,7 @@ foreach (explode("\n", $oids) as $data) {
|
||||
$sensor_index = 'oaPumpTEC' . $index;
|
||||
discover_sensor(null, 'current', $device, $num_oid, $sensor_index, 'gw-eydfa', $descr, $divisor, 1, $low_limit, $low_warn, $high_warn, $high_limit, $value);
|
||||
}
|
||||
if ($split_oid[0] == 'oaPumpTemp' && $index = 1) { // Temperature - C
|
||||
if ($split_oid[0] == 'oaPumpTemp' && $index == 1) { // Temperature - C
|
||||
$divisor = 10;
|
||||
$descr = 'Temperature Pump - ' . $index;
|
||||
$num_oid = '.1.3.6.1.4.1.17409.1.11.4.1.4.' . $index;
|
||||
|
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or (at your
|
||||
* option) any later version. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$pre_cache['timos_oids'] = snmpwalk_cache_multi_oid($device, 'tmnxDigitalDiagMonitorEntry', [], 'TIMETRA-PORT-MIB', 'timos');
|
@@ -11,12 +11,9 @@
|
||||
//portName OID is based on each device model/MIB
|
||||
$oid = $device['sysObjectID'] . '.1.9.1.1.7';
|
||||
|
||||
$port_names = snmpwalk_cache_oid($device, $oid, $port_names);
|
||||
|
||||
foreach ($port_names as $oid => $value) {
|
||||
if (! empty($value['iso'])) {
|
||||
// determine index
|
||||
$index = end(explode('.', $oid));
|
||||
$port_stats[$index]['ifAlias'] = $value['iso'];
|
||||
foreach (SnmpQuery::walk($oid)->values() as $oid => $name) {
|
||||
if ($name) {
|
||||
$index = \Illuminate\Support\Str::afterLast($oid, '.');
|
||||
$port_stats[$index]['ifAlias'] = $name;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user