Skip to content

Commit

Permalink
Updated OS Support: Dragonwave Horizon (#13193)
Browse files Browse the repository at this point in the history
* Removed older Horizon definitions

* Added Horizon Compact definitions via YAML.

* Added Horizon Duo definitions via YAML.

* Added Horizon Compact Plus definitions via YAML.

* Fixed issue with OID name casing for Horizon Duo EnetPort2CRC sensor

* Moved SNR/RSL/Tx Power to wireless sensor definitions.

* Reordered use statements to make StyleCI happy.
  • Loading branch information
noaheroufus committed Sep 8, 2021
1 parent 4bdc80d commit ebb582f
Show file tree
Hide file tree
Showing 24 changed files with 20,977 additions and 55 deletions.
29 changes: 0 additions & 29 deletions LibreNMS/OS/Horizon.php

This file was deleted.

49 changes: 49 additions & 0 deletions LibreNMS/OS/HorizonCompact.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace LibreNMS\OS;

use LibreNMS\Device\WirelessSensor;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessErrorsDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessPowerDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessSnrDiscovery;
use LibreNMS\OS;

class HorizonCompact extends OS implements WirelessSnrDiscovery, WirelessPowerDiscovery, WirelessRssiDiscovery, WirelessErrorsDiscovery
{
public function discoverWirelessSnr()
{
$oid = '.1.3.6.1.4.1.7262.2.2.5.1.2.8.0';

return [
new WirelessSensor('snr', $this->getDeviceId(), $oid, 'horizon-compact', 0, 'SNR', null, 1, 10),
];
}

public function discoverWirelessPower()
{
$oid = '.1.3.6.1.4.1.7262.2.2.5.1.3.2.0';

return [
new WirelessSensor('power', $this->getDeviceId(), $oid, 'horizon-compact', 0, 'Tx Power', null, 1, 10),
];
}

public function discoverWirelessRssi()
{
$oid = '.1.3.6.1.4.1.7262.2.2.5.1.2.4.0';

return [
new WirelessSensor('rssi', $this->getDeviceId(), $oid, 'horizon-compact', 0, 'RSL', null, 1, 10),
];
}

public function discoverWirelessErrors()
{
$oid = '.1.3.6.1.4.1.7262.2.2.5.1.2.15.3.0';

return [
new WirelessSensor('errors', $this->getDeviceId(), $oid, 'horizon-compact', 0, 'Rx Errors', null, 1, 10),
];
}
}
49 changes: 49 additions & 0 deletions LibreNMS/OS/HorizonCompactplus.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace LibreNMS\OS;

use LibreNMS\Device\WirelessSensor;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessErrorsDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessPowerDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessSnrDiscovery;
use LibreNMS\OS;

class HorizonCompactplus extends OS implements WirelessSnrDiscovery, WirelessPowerDiscovery, WirelessRssiDiscovery, WirelessErrorsDiscovery
{
public function discoverWirelessSnr()
{
$oid = '.1.3.6.1.4.1.7262.2.5.4.2.1.1.8.1';

return [
new WirelessSensor('snr', $this->getDeviceId(), $oid, 'horizon-compactplus', 0, 'SNR', null, 1, 10),
];
}

public function discoverWirelessPower()
{
$oid = '.1.3.6.1.4.1.7262.2.5.4.4.1.1.7.1';

return [
new WirelessSensor('power', $this->getDeviceId(), $oid, 'horizon-compactplus', 0, 'Tx Power', null, 1, 10),
];
}

public function discoverWirelessRssi()
{
$oid = '.1.3.6.1.4.1.7262.2.5.4.2.1.1.3.1';

return [
new WirelessSensor('rssi', $this->getDeviceId(), $oid, 'horizon-compactplus', 0, 'RSL', null, 1, 10),
];
}

public function discoverWirelessErrors()
{
$oid = '.1.3.6.1.4.1.7262.2.5.4.2.2.1.4.1';

return [
new WirelessSensor('errors', $this->getDeviceId(), $oid, 'horizon-compactplus', 0, 'Rx Errors'),
];
}
}
49 changes: 49 additions & 0 deletions LibreNMS/OS/HorizonDuo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace LibreNMS\OS;

use LibreNMS\Device\WirelessSensor;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessErrorsDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessPowerDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery;
use LibreNMS\Interfaces\Discovery\Sensors\WirelessSnrDiscovery;
use LibreNMS\OS;

class HorizonDuo extends OS implements WirelessSnrDiscovery, WirelessPowerDiscovery, WirelessRssiDiscovery, WirelessErrorsDiscovery
{
public function discoverWirelessSnr()
{
$oid = '.1.3.6.1.4.1.7262.2.3.5.2.2.1.9.1';

return [
new WirelessSensor('snr', $this->getDeviceId(), $oid, 'horizon-duo', 0, 'SNR', null, 1, 10),
];
}

public function discoverWirelessPower()
{
$oid = '.1.3.6.1.4.1.7262.2.3.5.4.1.1.10.1';

return [
new WirelessSensor('power', $this->getDeviceId(), $oid, 'horizon-duo', 0, 'Tx Power', null, 1, 10),
];
}

public function discoverWirelessRssi()
{
$oid = '.1.3.6.1.4.1.7262.2.3.5.2.2.1.4.1';

return [
new WirelessSensor('rssi', $this->getDeviceId(), $oid, 'horizon-duo', 0, 'RSL', null, 1, 10),
];
}

public function discoverWirelessErrors()
{
$oid = '.1.3.6.1.4.1.7262.2.3.5.2.3.1.4.1';

return [
new WirelessSensor('errors', $this->getDeviceId(), $oid, 'horizon-duo', 0, 'Rx Errors'),
];
}
}
105 changes: 105 additions & 0 deletions includes/definitions/discovery/horizon-compact.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
mib: HORIZON-ODU-MIB
modules:
os:
version: HORIZON-ODU-MIB::hzOduSystemOmniVersionNo.0
serial: HORIZON-ODU-MIB::hzOduUnitSerialNo.0
hardware: HORIZON-ODU-MIB::hzOduUnitAssemblylNo.0
sensors:
temperature:
data:
-
oid: hzOduRadio1Temperature
num_oid: '.1.3.6.1.4.1.7262.2.2.5.1.3.6.{{ $index }}'
index: 'hzOduRadio1Temperature.{{ $index }}'
divisor: 10
descr: 'Radio1 Temperature'
state:
data:
-
oid: hzOduModem1RxLossOfSignal
num_oid: '.1.3.6.1.4.1.7262.2.2.8.4.4.1.{{ $index }}'
index: 'hzOduModem1RxLossOfSignal.{{ $index }}'
descr: 'Modem1 Rx Loss of Signal'
states:
- { value: 1, generic: 0, graph: 0, descr: 'No' }
- { value: 2, generic: 2, graph: 0, descr: 'Yes' }
-
oid: hzOduEnetPort1EthernetLinkDown
num_oid: '.1.3.6.1.4.1.7262.2.2.8.3.1.9.{{ $index }}'
index: 'hzOduEnetPort1EthernetLinkDown.{{ $index }}'
descr: 'Enet Port1 Link State'
states:
- { value: 1, generic: 0, graph: 0, descr: 'Up' }
- { value: 2, generic: 2, graph: 0, descr: 'Down' }
-
oid: hzOduEnetPort2EthernetLinkDown
num_oid: '.1.3.6.1.4.1.7262.2.2.8.3.2.1.{{ $index }}'
index: 'hzOduEnetPort2EthernetLinkDown.{{ $index }}'
descr: 'Enet Port2 Link State'
states:
- { value: 1, generic: 0, graph: 0, descr: 'Up' }
- { value: 2, generic: 2, graph: 0, descr: 'Down' }
-
oid: hzOduRadio1TemperatureOutOfLimit
num_oid: '.1.3.6.1.4.1.7262.2.2.8.4.5.9.{{ $index }}'
index: 'hzOduRadio1TemperatureOutOfLimit.{{ $index }}'
descr: 'Radio1 Temp Out of Limit'
states:
- { value: 1, generic: 0, graph: 0, descr: 'No' }
- { value: 2, generic: 2, graph: 0, descr: 'Yes' }
-
oid: hzOduModem1ModulationType
num_oid: '.1.3.6.1.4.1.7262.2.2.5.1.2.5.{{ $index }}'
index: 'hzOduModem1ModulationType.{{ $index }}'
descr: 'Modem1 Modulation'
states:
- { value: 1, generic: 2, graph: 0, descr: 'qpsk' }
- { value: 2, generic: 2, graph: 0, descr: 'qam' }
- { value: 3, generic: 2, graph: 0, descr: 'qam16' }
- { value: 4, generic: 1, graph: 0, descr: 'qam32' }
- { value: 5, generic: 1, graph: 0, descr: 'qam64' }
- { value: 6, generic: 1, graph: 0, descr: 'qam128' }
- { value: 7, generic: 0, graph: 0, descr: 'qam256' }
- { value: 8, generic: 0, graph: 0, descr: 'x8psk' }
count:
data:
-
oid: hzOduModem1RxLossOfSignalCount
num_oid: '.1.3.6.1.4.1.7262.2.2.8.4.4.2.{{ $index }}'
index: 'hzOduModem1RxLossOfSignalCount.{{ $index }}'
descr: 'Modem1 Rx Loss of Signals'
-
oid: hzOduEnetPort1EthernetLinkDownActivatedCount
num_oid: '.1.3.6.1.4.1.7262.2.2.8.3.1.10.{{ $index }}'
index: 'hzOduEnetPort1EthernetLinkDownActivatedCount.{{ $index }}'
descr: 'Enet Port1 Link Downs'
-
oid: hzOduEnetPort2EthernetLinkDownActivatedCount
num_oid: '.1.3.6.1.4.1.7262.2.2.8.3.2.2.{{ $index }}'
index: 'hzOduEnetPort2EthernetLinkDownActivatedCount.{{ $index }}'
descr: 'Enet Port2 Link Downs'
-
oid: hzOduRadio1TemperatureOutOfLimitCount
num_oid: '.1.3.6.1.4.1.7262.2.2.8.4.5.10.{{ $index }}'
index: 'hzOduRadio1TemperatureOutOfLimitCount.{{ $index }}'
descr: 'Radio1 Temp Out Of Limits'
-
oid: hzOduEnetPort1RxFramesInError
num_oid: '.1.3.6.1.4.1.7262.2.2.4.1.4.5.{{ $index }}'
index: 'hzOduEnetPort1RxFramesInError.{{ $index }}'
descr: 'Enet Port1 Input Error'
-
oid: hzOduEnetPort1RxFramesCRCError
num_oid: '.1.3.6.1.4.1.7262.2.2.4.1.4.6.{{ $index }}'
index: 'hzOduEnetPort1RxFramesCRCError.{{ $index }}'
descr: 'Enet Port1 CRC Error'
-
oid: hzOduEnetPort2RxFramesInError
num_oid: '.1.3.6.1.4.1.7262.2.2.4.2.4.5.{{ $index }}'
index: 'hzOduEnetPort2RxFramesInError.{{ $index }}'
descr: 'Enet Port2 Input Error'
-
oid: hzOduEnetPort2RxFramesCRCError
num_oid: '.1.3.6.1.4.1.7262.2.2.4.2.4.6.{{ $index }}'
index: 'hzOduEnetPort2RxFramesCRCError.{{ $index }}'
descr: 'Enet Port2 CRC Error'
75 changes: 75 additions & 0 deletions includes/definitions/discovery/horizon-compactplus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
mib: DRAGONWAVE-HCP-MIB
modules:
os:
version: DRAGONWAVE-HCP-MIB::hzCpSwInvOmniRelease.bank-A
serial: DRAGONWAVE-HCP-MIB::hzCpUnitSerialNo.0
hardware: DRAGONWAVE-HCP-MIB::hzCpUnitAssemblyNo.0
sensors:
temperature:
data:
-
oid: hzCpRadioTemperature
num_oid: '.1.3.6.1.4.1.7262.2.5.4.4.1.1.11.{{ $index }}'
index: 'hzCpRadioTemperature.{{ $index }}'
divisor: 10
descr: 'Radio{{ $index }} Temp'
snmp_flags: ['-ObsQ']
state:
data:
-
oid: hzCpAlarmStatus.modemRxLossOfSignal.1
value: hzCpAlarmStatus
num_oid: '.1.3.6.1.4.1.7262.2.5.5.3.1.3.13.1'
index: 'hzCpAlarmStatus.modemRxLossOfSignal.1'
descr: 'Modem1 Rx Loss Of Signal'
states:
- { value: 1, generic: 0, graph: 0, descr: 'No' }
- { value: 2, generic: 2, graph: 0, descr: 'Yes' }
-
oid: hzCpEnetPortLinkStatus
num_oid: '.1.3.6.1.4.1.7262.2.5.3.1.2.1.2.{{ $index }}'
index: 'hzCpEnetPortLinkStatus.{{ $index }}'
descr: 'Enet Port{{ $index }} Link State'
states:
- { value: 1, generic: 2, graph: 0, descr: 'Down' }
- { value: 2, generic: 0, graph: 0, descr: 'Up' }
snmp_flags: ['-ObsQe']
-
oid: hzCpAlarmStatus.tempOutOfLimits.1
value: hzCpAlarmStatus
num_oid: '.1.3.6.1.4.1.7262.2.5.5.3.1.3.24.1'
index: 'hzCpAlarmStatus.tempOutOfLimits.1'
descr: 'Radio1 Temp Out of Limit'
states:
- { value: 1, generic: 0, graph: 0, descr: 'No' }
- { value: 2, generic: 2, graph: 0, descr: 'Yes' }
-
oid: hzCpModemModulationType
num_oid: '.1.3.6.1.4.1.7262.2.5.4.2.1.1.5.{{ $index }}'
index: 'hzCpModemModulationType.{{ $index }}'
descr: 'Modem{{ $index }} Modulation'
states:
- { value: 1, generic: 2, graph: 0, descr: 'qpsk' }
- { value: 2, generic: 2, graph: 0, descr: 'qam16' }
- { value: 3, generic: 2, graph: 0, descr: 'qam32' }
- { value: 4, generic: 1, graph: 0, descr: 'qam64' }
- { value: 5, generic: 1, graph: 0, descr: 'qam128' }
- { value: 6, generic: 1, graph: 0, descr: 'qam256' }
- { value: 7, generic: 0, graph: 0, descr: 'qam512' }
- { value: 8, generic: 0, graph: 0, descr: 'qam1024' }
- { value: 9, generic: 0, graph: 0, descr: 'qam2048' }
snmp_flags: ['-ObsQ']
count:
data:
-
oid: hzCpEnetPortRxFramesLengthErrors
num_oid: '.1.3.6.1.4.1.7262.2.5.3.1.3.1.6.{{ $index }}'
index: 'hzCpEnetPortRxFramesLengthErrors.{{ $index }}'
descr: 'Enet Port{{ $index }} Input Errors'
snmp_flags: ['-ObsQ']
-
oid: hzCpEnetPortRxFramesCRCErrors
num_oid: '.1.3.6.1.4.1.7262.2.5.3.1.3.1.7.{{ $index }}'
index: 'hzCpEnetPortRxFramesCRCErrors.{{ $index }}'
descr: 'Enet Port{{ $index }} CRC Errors'
snmp_flags: ['-ObsQ']

0 comments on commit ebb582f

Please sign in to comment.