mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Add Device Trango Apex-Plus (#9483)
* Added Device Trango Apex-Plus * Code Climate Blank Line Fix * Added json test file + fixed awplus file stopping snmpsimd starting * Updated awplus json * Update apex-plus.json
This commit is contained in:
parent
95d37262d3
commit
0ffb88dd1b
110
LibreNMS/OS/ApexPlus.php
Normal file
110
LibreNMS/OS/ApexPlus.php
Normal file
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* ApexPlus.php
|
||||
* Trango Systems Apex Plus Wireless Sensors for LibreNMS
|
||||
* Author: Cory Hill (cory@metavrs.com)
|
||||
*
|
||||
*/
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessFrequencyDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessMseDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRateDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessErrorRateDiscovery;
|
||||
use LibreNMS\OS;
|
||||
|
||||
class ApexPlus extends OS implements
|
||||
WirelessRssiDiscovery,
|
||||
WirelessFrequencyDiscovery,
|
||||
WirelessMseDiscovery,
|
||||
WirelessRateDiscovery,
|
||||
WirelessErrorRateDiscovery
|
||||
{
|
||||
public function discoverWirelessRssi()
|
||||
{
|
||||
// GIGA-PLUS-MIB::rfRSSIInt
|
||||
$oid = '.1.3.6.1.4.1.5454.1.80.3.14.2.0';
|
||||
$sensors = array();
|
||||
$sensors[] = new WirelessSensor(
|
||||
'rssi',
|
||||
$this->getDeviceId(),
|
||||
$oid,
|
||||
'apex-plus',
|
||||
1,
|
||||
'RSSI'
|
||||
);
|
||||
return $sensors;
|
||||
}
|
||||
public function discoverWirelessFrequency()
|
||||
{
|
||||
// GIGA-PLUS-MIB::rfTxFrequencyInt, rfRxFrequencyInt
|
||||
$txoid = '.1.3.6.1.4.1.5454.1.80.3.1.1.2.0';
|
||||
$rxoid = '.1.3.6.1.4.1.5454.1.80.3.1.2.2.0';
|
||||
return array(
|
||||
new WirelessSensor(
|
||||
'frequency',
|
||||
$this->getDeviceId(),
|
||||
$txoid,
|
||||
'apex-plus',
|
||||
0,
|
||||
'Tx Frequency'
|
||||
),
|
||||
new WirelessSensor(
|
||||
'frequency',
|
||||
$this->getDeviceId(),
|
||||
$rxoid,
|
||||
'apex-plus',
|
||||
1,
|
||||
'Rx Frequency'
|
||||
)
|
||||
);
|
||||
}
|
||||
public function discoverWirelessMse()
|
||||
{
|
||||
// GIGA-PLUS-MIB::modemMSEInt
|
||||
$oid = '.1.3.6.1.4.1.5454.1.80.2.4.2.2.0';
|
||||
$sensors = array();
|
||||
$sensors[] = new WirelessSensor(
|
||||
'mse',
|
||||
$this->getDeviceId(),
|
||||
$oid,
|
||||
'apex-plus',
|
||||
1,
|
||||
'MSE'
|
||||
);
|
||||
return $sensors;
|
||||
}
|
||||
public function discoverWirelessRate()
|
||||
{
|
||||
// GIGA-PLUS-MIB::rfSpeedInt
|
||||
$oid = '.1.3.6.1.4.1.5454.1.80.3.6.4.2.0';
|
||||
$sensors = array();
|
||||
$sensors[] = new WirelessSensor(
|
||||
'rate',
|
||||
$this->getDeviceId(),
|
||||
$oid,
|
||||
'apex-plus',
|
||||
1,
|
||||
'Rate'
|
||||
);
|
||||
return $sensors;
|
||||
}
|
||||
public function discoverWirelessErrorRate()
|
||||
{
|
||||
// GIGA-PLUS-MIB::modemBER
|
||||
$oid = '.1.3.6.1.4.1.5454.1.80.2.4.1.1.0';
|
||||
$sensors = array();
|
||||
$sensors[] = new WirelessSensor(
|
||||
'error-rate',
|
||||
$this->getDeviceId(),
|
||||
$oid,
|
||||
'apex-plus',
|
||||
1,
|
||||
'BER'
|
||||
);
|
||||
return $sensors;
|
||||
}
|
||||
}
|
10
includes/definitions/apex-plus.yaml
Normal file
10
includes/definitions/apex-plus.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
os: apex-plus
|
||||
text: 'Apex Plus'
|
||||
type: wireless
|
||||
icon: trango
|
||||
mib_dir:
|
||||
- trango
|
||||
over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
discovery:
|
||||
- sysDescr_regex: '/^ApexPlus.*/'
|
3
includes/polling/os/apex-plus.inc.php
Normal file
3
includes/polling/os/apex-plus.inc.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
$version = snmp_get($device, '.1.3.6.1.4.1.5454.1.80.1.1.2.0', '-OQv');
|
||||
$hardware = 'Trango ' . $device['sysDescr'];
|
1152
tests/data/apex-plus.json
Normal file
1152
tests/data/apex-plus.json
Normal file
File diff suppressed because it is too large
Load Diff
247
tests/snmpsim/apex-plus.snmprec
Normal file
247
tests/snmpsim/apex-plus.snmprec
Normal file
@ -0,0 +1,247 @@
|
||||
1.3.6.1.2.1.1.1.0|4|ApexPlus-3.2.0
|
||||
1.3.6.1.2.1.1.2.0|6|1.3
|
||||
1.3.6.1.2.1.1.3.0|67|129924170
|
||||
1.3.6.1.2.1.1.4.0|4|<private>
|
||||
1.3.6.1.2.1.1.5.0|4|<private>
|
||||
1.3.6.1.2.1.1.6.0|4|<private>
|
||||
1.3.6.1.2.1.2.2.1.2.1|4|lo
|
||||
1.3.6.1.2.1.2.2.1.2.2|4|eth1
|
||||
1.3.6.1.2.1.2.2.1.2.3|4|eth2
|
||||
1.3.6.1.2.1.2.2.1.2.4|4|eth2.4085
|
||||
1.3.6.1.2.1.2.2.1.3.1|2|24
|
||||
1.3.6.1.2.1.2.2.1.3.2|2|6
|
||||
1.3.6.1.2.1.2.2.1.3.3|2|6
|
||||
1.3.6.1.2.1.2.2.1.3.4|2|6
|
||||
1.3.6.1.2.1.2.2.1.4.1|2|16436
|
||||
1.3.6.1.2.1.2.2.1.4.2|2|1500
|
||||
1.3.6.1.2.1.2.2.1.4.3|2|1500
|
||||
1.3.6.1.2.1.2.2.1.4.4|2|1500
|
||||
1.3.6.1.2.1.2.2.1.6.1|4|
|
||||
1.3.6.1.2.1.2.2.1.6.2|4x|0001DE87D8CA
|
||||
1.3.6.1.2.1.2.2.1.6.3|4x|0001DE87D8CB
|
||||
1.3.6.1.2.1.2.2.1.6.4|4x|0001DE87D8CB
|
||||
1.3.6.1.2.1.2.2.1.7.1|2|1
|
||||
1.3.6.1.2.1.2.2.1.7.2|2|1
|
||||
1.3.6.1.2.1.2.2.1.7.3|2|1
|
||||
1.3.6.1.2.1.2.2.1.7.4|2|1
|
||||
1.3.6.1.2.1.2.2.1.8.1|2|1
|
||||
1.3.6.1.2.1.2.2.1.8.2|2|1
|
||||
1.3.6.1.2.1.2.2.1.8.3|2|1
|
||||
1.3.6.1.2.1.2.2.1.8.4|2|1
|
||||
1.3.6.1.2.1.2.2.1.9.1|67|0
|
||||
1.3.6.1.2.1.2.2.1.9.2|67|98799
|
||||
1.3.6.1.2.1.2.2.1.9.3|67|0
|
||||
1.3.6.1.2.1.2.2.1.9.4|67|0
|
||||
1.3.6.1.2.1.2.2.1.13.1|65|0
|
||||
1.3.6.1.2.1.2.2.1.13.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.13.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.13.4|65|0
|
||||
1.3.6.1.2.1.2.2.1.14.1|65|0
|
||||
1.3.6.1.2.1.2.2.1.14.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.14.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.14.4|65|0
|
||||
1.3.6.1.2.1.2.2.1.19.1|65|0
|
||||
1.3.6.1.2.1.2.2.1.19.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.19.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.19.4|65|0
|
||||
1.3.6.1.2.1.2.2.1.20.1|65|0
|
||||
1.3.6.1.2.1.2.2.1.20.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.20.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.20.4|65|0
|
||||
1.3.6.1.2.1.4.3.0|65|359004
|
||||
1.3.6.1.2.1.4.4.0|65|0
|
||||
1.3.6.1.2.1.4.5.0|65|0
|
||||
1.3.6.1.2.1.4.6.0|65|0
|
||||
1.3.6.1.2.1.4.7.0|65|0
|
||||
1.3.6.1.2.1.4.8.0|65|0
|
||||
1.3.6.1.2.1.4.9.0|65|359004
|
||||
1.3.6.1.2.1.4.10.0|65|350458
|
||||
1.3.6.1.2.1.4.11.0|65|1
|
||||
1.3.6.1.2.1.4.12.0|65|0
|
||||
1.3.6.1.2.1.4.14.0|65|0
|
||||
1.3.6.1.2.1.4.15.0|65|0
|
||||
1.3.6.1.2.1.4.16.0|65|0
|
||||
1.3.6.1.2.1.4.17.0|65|0
|
||||
1.3.6.1.2.1.4.18.0|65|0
|
||||
1.3.6.1.2.1.4.19.0|65|0
|
||||
1.3.6.1.2.1.5.1.0|65|85244
|
||||
1.3.6.1.2.1.5.2.0|65|0
|
||||
1.3.6.1.2.1.5.3.0|65|3354
|
||||
1.3.6.1.2.1.5.4.0|65|0
|
||||
1.3.6.1.2.1.5.5.0|65|0
|
||||
1.3.6.1.2.1.5.6.0|65|0
|
||||
1.3.6.1.2.1.5.7.0|65|0
|
||||
1.3.6.1.2.1.5.8.0|65|81890
|
||||
1.3.6.1.2.1.5.9.0|65|0
|
||||
1.3.6.1.2.1.5.10.0|65|0
|
||||
1.3.6.1.2.1.5.11.0|65|0
|
||||
1.3.6.1.2.1.5.12.0|65|0
|
||||
1.3.6.1.2.1.5.13.0|65|0
|
||||
1.3.6.1.2.1.5.14.0|65|81896
|
||||
1.3.6.1.2.1.5.15.0|65|0
|
||||
1.3.6.1.2.1.5.16.0|65|6
|
||||
1.3.6.1.2.1.5.17.0|65|0
|
||||
1.3.6.1.2.1.5.18.0|65|0
|
||||
1.3.6.1.2.1.5.19.0|65|0
|
||||
1.3.6.1.2.1.5.20.0|65|0
|
||||
1.3.6.1.2.1.5.21.0|65|0
|
||||
1.3.6.1.2.1.5.22.0|65|81890
|
||||
1.3.6.1.2.1.5.23.0|65|0
|
||||
1.3.6.1.2.1.5.24.0|65|0
|
||||
1.3.6.1.2.1.5.25.0|65|0
|
||||
1.3.6.1.2.1.5.26.0|65|0
|
||||
1.3.6.1.2.1.5.29.1.2.1|65|85244
|
||||
1.3.6.1.2.1.5.29.1.2.2|65|0
|
||||
1.3.6.1.2.1.5.29.1.3.1|65|0
|
||||
1.3.6.1.2.1.5.29.1.3.2|65|0
|
||||
1.3.6.1.2.1.5.29.1.4.1|65|81896
|
||||
1.3.6.1.2.1.5.29.1.4.2|65|0
|
||||
1.3.6.1.2.1.5.29.1.5.1|65|0
|
||||
1.3.6.1.2.1.5.29.1.5.2|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.0|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.3|65|3354
|
||||
1.3.6.1.2.1.5.30.1.3.1.4|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.5|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.8|65|81890
|
||||
1.3.6.1.2.1.5.30.1.3.1.11|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.12|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.13|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.14|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.17|65|0
|
||||
1.3.6.1.2.1.5.30.1.3.1.18|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.0|65|81890
|
||||
1.3.6.1.2.1.5.30.1.4.1.3|65|6
|
||||
1.3.6.1.2.1.5.30.1.4.1.4|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.5|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.8|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.11|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.12|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.13|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.14|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.17|65|0
|
||||
1.3.6.1.2.1.5.30.1.4.1.18|65|0
|
||||
1.3.6.1.2.1.6.5.0|65|2
|
||||
1.3.6.1.2.1.6.6.0|65|238
|
||||
1.3.6.1.2.1.6.7.0|65|0
|
||||
1.3.6.1.2.1.6.8.0|65|7
|
||||
1.3.6.1.2.1.6.9.0|66|0
|
||||
1.3.6.1.2.1.6.10.0|65|5457
|
||||
1.3.6.1.2.1.6.11.0|65|5917
|
||||
1.3.6.1.2.1.6.12.0|65|38
|
||||
1.3.6.1.2.1.6.14.0|65|0
|
||||
1.3.6.1.2.1.6.15.0|65|9
|
||||
1.3.6.1.2.1.7.1.0|65|262609
|
||||
1.3.6.1.2.1.7.2.0|65|6
|
||||
1.3.6.1.2.1.7.3.0|65|2217
|
||||
1.3.6.1.2.1.7.4.0|65|262614
|
||||
1.3.6.1.2.1.11.1.0|65|255898
|
||||
1.3.6.1.2.1.11.2.0|65|255897
|
||||
1.3.6.1.2.1.11.3.0|65|0
|
||||
1.3.6.1.2.1.11.4.0|65|0
|
||||
1.3.6.1.2.1.11.5.0|65|0
|
||||
1.3.6.1.2.1.11.6.0|65|0
|
||||
1.3.6.1.2.1.11.8.0|65|0
|
||||
1.3.6.1.2.1.11.9.0|65|0
|
||||
1.3.6.1.2.1.11.10.0|65|0
|
||||
1.3.6.1.2.1.11.11.0|65|0
|
||||
1.3.6.1.2.1.11.12.0|65|0
|
||||
1.3.6.1.2.1.11.13.0|65|2061059
|
||||
1.3.6.1.2.1.11.14.0|65|4
|
||||
1.3.6.1.2.1.11.15.0|65|79607
|
||||
1.3.6.1.2.1.11.16.0|65|96
|
||||
1.3.6.1.2.1.11.17.0|65|4
|
||||
1.3.6.1.2.1.11.18.0|65|0
|
||||
1.3.6.1.2.1.11.19.0|65|0
|
||||
1.3.6.1.2.1.11.20.0|65|0
|
||||
1.3.6.1.2.1.11.21.0|65|8
|
||||
1.3.6.1.2.1.11.22.0|65|0
|
||||
1.3.6.1.2.1.11.24.0|65|0
|
||||
1.3.6.1.2.1.11.25.0|65|0
|
||||
1.3.6.1.2.1.11.26.0|65|0
|
||||
1.3.6.1.2.1.11.27.0|65|0
|
||||
1.3.6.1.2.1.11.28.0|65|255899
|
||||
1.3.6.1.2.1.11.29.0|65|0
|
||||
1.3.6.1.2.1.11.30.0|2|2
|
||||
1.3.6.1.2.1.11.31.0|65|0
|
||||
1.3.6.1.2.1.11.32.0|65|0
|
||||
1.3.6.1.2.1.25.1.1.0|67|129930620
|
||||
1.3.6.1.2.1.25.1.5.0|66|0
|
||||
1.3.6.1.2.1.25.1.6.0|66|66
|
||||
1.3.6.1.2.1.31.1.1.1.1.1|4|lo
|
||||
1.3.6.1.2.1.31.1.1.1.1.2|4|eth1
|
||||
1.3.6.1.2.1.31.1.1.1.1.3|4|eth2
|
||||
1.3.6.1.2.1.31.1.1.1.1.4|4|eth2.4085
|
||||
1.3.6.1.2.1.31.1.1.1.2.1|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.2.2|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.2.3|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.2.4|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.3.1|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.3.2|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.3.3|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.3.4|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.4.1|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.4.2|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.4.3|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.4.4|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.5.1|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.5.2|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.5.3|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.5.4|65|0
|
||||
1.3.6.1.2.1.31.1.1.1.6.1|70|1114042
|
||||
1.3.6.1.2.1.31.1.1.1.6.2|70|52530749
|
||||
1.3.6.1.2.1.31.1.1.1.6.3|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.6.4|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.7.1|70|13853
|
||||
1.3.6.1.2.1.31.1.1.1.7.2|70|636205
|
||||
1.3.6.1.2.1.31.1.1.1.7.3|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.7.4|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.8.1|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.8.2|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.8.3|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.8.4|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.9.1|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.9.2|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.9.3|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.9.4|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.10.1|70|1114042
|
||||
1.3.6.1.2.1.31.1.1.1.10.2|70|66583561
|
||||
1.3.6.1.2.1.31.1.1.1.10.3|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.10.4|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.11.1|70|13853
|
||||
1.3.6.1.2.1.31.1.1.1.11.2|70|357063
|
||||
1.3.6.1.2.1.31.1.1.1.11.3|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.11.4|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.12.1|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.12.2|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.12.3|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.12.4|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.13.1|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.13.2|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.13.3|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.13.4|70|0
|
||||
1.3.6.1.2.1.31.1.1.1.15.1|66|10
|
||||
1.3.6.1.2.1.31.1.1.1.15.2|66|100
|
||||
1.3.6.1.2.1.31.1.1.1.15.3|66|100
|
||||
1.3.6.1.2.1.31.1.1.1.15.4|66|100
|
||||
1.3.6.1.2.1.31.1.1.1.16.1|2|2
|
||||
1.3.6.1.2.1.31.1.1.1.16.2|2|2
|
||||
1.3.6.1.2.1.31.1.1.1.16.3|2|2
|
||||
1.3.6.1.2.1.31.1.1.1.16.4|2|2
|
||||
1.3.6.1.2.1.31.1.1.1.17.2|2|1
|
||||
1.3.6.1.2.1.31.1.1.1.17.3|2|1
|
||||
1.3.6.1.2.1.31.1.1.1.17.4|2|1
|
||||
1.3.6.1.2.1.31.1.1.1.18.1|4|
|
||||
1.3.6.1.2.1.31.1.1.1.18.2|4|
|
||||
1.3.6.1.2.1.31.1.1.1.18.3|4|
|
||||
1.3.6.1.2.1.31.1.1.1.18.4|4|
|
||||
1.3.6.1.2.1.31.1.1.1.19.1|67|0
|
||||
1.3.6.1.2.1.31.1.1.1.19.2|67|0
|
||||
1.3.6.1.2.1.31.1.1.1.19.3|67|0
|
||||
1.3.6.1.2.1.31.1.1.1.19.4|67|0
|
||||
1.3.6.1.4.1.5454.1.80.2.4.1.1.0|2|0
|
||||
1.3.6.1.4.1.5454.1.80.2.4.2.2.0|2|-37
|
||||
1.3.6.1.4.1.5454.1.80.3.1.1.2.0|2|11525000
|
||||
1.3.6.1.4.1.5454.1.80.3.1.2.2.0|2|11035000
|
||||
1.3.6.1.4.1.5454.1.80.3.6.4.2.0|2|36500
|
||||
1.3.6.1.4.1.5454.1.80.3.14.2.0|2|-46
|
||||
1.3.6.1.6.3.10.2.1.3.0|2|1299235
|
Loading…
Reference in New Issue
Block a user