mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Add support for FortiNet FortiExtender (#16219)
* Add support for FortiExtender - Wireless Sensors * Add support for FortiExtender - Discovery YAML * Add support for FortiExtender - YAML Sensors * FortiExtender 201E SNMPsim * FortiExtender 201E - Test Data * FortiExtender MIB * StyleCI * Fix StyleCI * Better now? * Whoops * Update fortiextender_201e.json * Update fortiextender_201e.json * Add files via upload * Delete mibs/fortinet/FORTINET-FORTIEXTENDER-MIB.mib
This commit is contained in:
parent
512403a255
commit
090611f6c1
92
LibreNMS/OS/Fortiextender.php
Normal file
92
LibreNMS/OS/Fortiextender.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/*
|
||||
* Fortiextender.php
|
||||
*
|
||||
* -Description-
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package LibreNMS
|
||||
* @link https://www.librenms.org
|
||||
* @copyright 2024 CTNET B.V.
|
||||
* @author Rudy Broersma <r.broersma@ctnet.nl>
|
||||
*/
|
||||
|
||||
namespace LibreNMS\OS;
|
||||
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRsrpDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRsrqDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessRssiDiscovery;
|
||||
use LibreNMS\Interfaces\Discovery\Sensors\WirelessSinrDiscovery;
|
||||
use LibreNMS\OS\Shared\Fortinet;
|
||||
|
||||
class Fortiextender extends Fortinet implements
|
||||
WirelessSinrDiscovery,
|
||||
WirelessRsrpDiscovery,
|
||||
WirelessRsrqDiscovery,
|
||||
WirelessRssiDiscovery
|
||||
{
|
||||
public function discoverWirelessSinr()
|
||||
{
|
||||
$sinr_group = snmpwalk_group($this->getDeviceArray(), 'fextInfoModemStatusSINR', 'FORTINET-FORTIEXTENDER-MIB', 1);
|
||||
$oid = '.1.3.6.1.4.1.12356.121.21.3.1.1.28.';
|
||||
|
||||
$sinr = [];
|
||||
foreach ($sinr_group as $key => $sinr_entry) {
|
||||
$sinr[] = new WirelessSensor('sinr', $this->getDeviceId(), $oid . $key, 'fortiextender', $key, 'Modem ' . $key);
|
||||
}
|
||||
|
||||
return $sinr;
|
||||
}
|
||||
|
||||
public function discoverWirelessRsrp()
|
||||
{
|
||||
$rsrp_group = snmpwalk_group($this->getDeviceArray(), 'fextInfoModemStatusSINR', 'FORTINET-FORTIEXTENDER-MIB', 1);
|
||||
$oid = '.1.3.6.1.4.1.12356.121.21.3.1.1.29.';
|
||||
|
||||
$rsrp = [];
|
||||
foreach ($rsrp_group as $key => $rsrp_entry) {
|
||||
$rsrp[] = new WirelessSensor('rsrp', $this->getDeviceId(), $oid . $key, 'fortiextender', $key, 'Modem ' . $key);
|
||||
}
|
||||
|
||||
return $rsrp;
|
||||
}
|
||||
|
||||
public function discoverWirelessRsrq()
|
||||
{
|
||||
$rsrq_group = snmpwalk_group($this->getDeviceArray(), 'fextInfoModemStatusRSRQ', 'FORTINET-FORTIEXTENDER-MIB', 1);
|
||||
$oid = '.1.3.6.1.4.1.12356.121.21.3.1.1.30.';
|
||||
|
||||
$rsrq = [];
|
||||
foreach ($rsrq_group as $key => $rsrq_entry) {
|
||||
$rsrq[] = new WirelessSensor('rsrq', $this->getDeviceId(), $oid . $key, 'fortiextender', $key, 'Modem ' . $key);
|
||||
}
|
||||
|
||||
return $rsrq;
|
||||
}
|
||||
|
||||
public function discoverWirelessRssi()
|
||||
{
|
||||
$rsrq_group = snmpwalk_group($this->getDeviceArray(), 'fextInfoModemStatusRSSI', 'FORTINET-FORTIEXTENDER-MIB', 1);
|
||||
$oid = '.1.3.6.1.4.1.12356.121.21.3.1.1.22.';
|
||||
|
||||
$rsrq = [];
|
||||
foreach ($rsrq_group as $key => $rsrq_entry) {
|
||||
$rsrq[] = new WirelessSensor('rssi', $this->getDeviceId(), $oid . $key, 'fortiextender', $key, 'Modem ' . $key);
|
||||
}
|
||||
|
||||
return $rsrq;
|
||||
}
|
||||
}
|
42
includes/definitions/discovery/fortiextender.yaml
Normal file
42
includes/definitions/discovery/fortiextender.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
mib: FORTINET-FORTIEXTENDER-MIB
|
||||
modules:
|
||||
mempools:
|
||||
data:
|
||||
-
|
||||
percent_used: FORTINET-FORTIEXTENDER-MIB::fextInfoMemUsage
|
||||
descr: 'Memory'
|
||||
os:
|
||||
serial:
|
||||
- FORTINET-FORTIEXTENDER-MIB::fextInfoSN.0
|
||||
version: FORTINET-FORTIEXTENDER-MIB::fextInfoImage.0
|
||||
version_regex: '/v(?<version>[\d.]+)/'
|
||||
hardware: FORTINET-FORTIEXTENDER-MIB::fextInfoModel.0
|
||||
processors:
|
||||
data:
|
||||
-
|
||||
oid: FORTINET-FORTIEXTENDER-MIB::fextInfoCPUUsage
|
||||
num_oid: '.1.3.6.1.4.1.12356.121.21.1.2.1.{{ $index }}'
|
||||
descr: 'Processor Usage'
|
||||
sensors:
|
||||
count:
|
||||
data:
|
||||
-
|
||||
oid: fextInfoModemStatusReconnectCount
|
||||
num_oid: '.1.3.6.1.4.1.12356.121.21.3.1.1.33.{{ $index }}'
|
||||
index: 'fextInfoModemStatusReconnectCount.{{ $index }}'
|
||||
descr: 'Reconnect Count Modem {{ $index }}'
|
||||
runtime:
|
||||
data:
|
||||
-
|
||||
oid: fextInfoModemStatusUptime
|
||||
num_oid: '.1.3.6.1.4.1.12356.121.21.3.1.1.35.{{ $index }}'
|
||||
index: 'fextInfoModemStatusUptime.{{ $index }}'
|
||||
descr: 'Online Time Modem {{ $index }}'
|
||||
divisor: 60
|
||||
dbm:
|
||||
data:
|
||||
-
|
||||
oid: fextInfoModemStatusSignalStrength
|
||||
num_oid: '.1.3.6.1.4.1.12356.121.21.3.1.1.23.{{ $index }}'
|
||||
index: 'fextInfoModemStatusSignalStrength.{{ $index }}'
|
||||
descr: 'Signal Strength Modem {{ $index }}'
|
14
includes/definitions/fortiextender.yaml
Normal file
14
includes/definitions/fortiextender.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
os: fortiextender
|
||||
text: 'Fortinet FortiExtender'
|
||||
type: network
|
||||
icon: fortinet
|
||||
mib_dir: fortinet
|
||||
over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
discovery:
|
||||
-
|
||||
sysObjectID:
|
||||
- .1.3.6.1.4.1.12356.121. #FortiExtender
|
||||
|
7273
mibs/fortinet/FORTINET-FORTIEXTENDER-MIB
Normal file
7273
mibs/fortinet/FORTINET-FORTIEXTENDER-MIB
Normal file
File diff suppressed because it is too large
Load Diff
1560
tests/data/fortiextender_201e.json
Normal file
1560
tests/data/fortiextender_201e.json
Normal file
File diff suppressed because it is too large
Load Diff
150
tests/snmpsim/fortiextender_201e.snmprec
Normal file
150
tests/snmpsim/fortiextender_201e.snmprec
Normal file
@ -0,0 +1,150 @@
|
||||
1.3.6.1.2.1.1.1.0|4|FEX Trambaan
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.12356.121.200.201
|
||||
1.3.6.1.2.1.1.3.0|67|8182312
|
||||
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.1.1|2|1
|
||||
1.3.6.1.2.1.2.2.1.1.2|2|2
|
||||
1.3.6.1.2.1.2.2.1.1.3|2|3
|
||||
1.3.6.1.2.1.2.2.1.1.4|2|4
|
||||
1.3.6.1.2.1.2.2.1.1.5|2|5
|
||||
1.3.6.1.2.1.2.2.1.1.6|2|6
|
||||
1.3.6.1.2.1.2.2.1.2.1|4|port4
|
||||
1.3.6.1.2.1.2.2.1.2.2|4|wan
|
||||
1.3.6.1.2.1.2.2.1.2.3|4|lan
|
||||
1.3.6.1.2.1.2.2.1.2.4|4|lo
|
||||
1.3.6.1.2.1.2.2.1.2.5|4|lte1
|
||||
1.3.6.1.2.1.2.2.1.2.6|4|capwap1
|
||||
1.3.6.1.2.1.2.2.1.3.1|2|6
|
||||
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|209
|
||||
1.3.6.1.2.1.2.2.1.3.4|2|1
|
||||
1.3.6.1.2.1.2.2.1.3.5|2|71
|
||||
1.3.6.1.2.1.2.2.1.3.6|2|1
|
||||
1.3.6.1.2.1.2.2.1.4.1|2|1500
|
||||
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|65536
|
||||
1.3.6.1.2.1.2.2.1.4.5|2|1500
|
||||
1.3.6.1.2.1.2.2.1.4.6|2|1450
|
||||
1.3.6.1.2.1.2.2.1.5.1|66|0
|
||||
1.3.6.1.2.1.2.2.1.5.2|66|0
|
||||
1.3.6.1.2.1.2.2.1.5.3|66|0
|
||||
1.3.6.1.2.1.2.2.1.5.4|66|0
|
||||
1.3.6.1.2.1.2.2.1.5.5|66|0
|
||||
1.3.6.1.2.1.2.2.1.5.6|66|0
|
||||
1.3.6.1.2.1.2.2.1.6.1|4x|ac712e44cf91
|
||||
1.3.6.1.2.1.2.2.1.6.2|4x|ac712e44cf95
|
||||
1.3.6.1.2.1.2.2.1.6.3|4x|ac712e45cf91
|
||||
1.3.6.1.2.1.2.2.1.6.4|4x|000000000000
|
||||
1.3.6.1.2.1.2.2.1.6.5|4x|befdcc8d4408
|
||||
1.3.6.1.2.1.2.2.1.6.6|4x|a203d153ba5c
|
||||
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.7.5|2|1
|
||||
1.3.6.1.2.1.2.2.1.7.6|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|2
|
||||
1.3.6.1.2.1.2.2.1.8.3|2|2
|
||||
1.3.6.1.2.1.2.2.1.8.4|2|1
|
||||
1.3.6.1.2.1.2.2.1.8.5|2|1
|
||||
1.3.6.1.2.1.2.2.1.8.6|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|0
|
||||
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.9.5|67|0
|
||||
1.3.6.1.2.1.2.2.1.9.6|67|0
|
||||
1.3.6.1.2.1.2.2.1.10.1|65|133537153
|
||||
1.3.6.1.2.1.2.2.1.10.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.10.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.10.4|65|899
|
||||
1.3.6.1.2.1.2.2.1.10.5|65|68555444
|
||||
1.3.6.1.2.1.2.2.1.10.6|65|27623656
|
||||
1.3.6.1.2.1.2.2.1.11.1|65|779366
|
||||
1.3.6.1.2.1.2.2.1.11.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.11.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.11.4|65|11
|
||||
1.3.6.1.2.1.2.2.1.11.5|65|532752
|
||||
1.3.6.1.2.1.2.2.1.11.6|65|519691
|
||||
1.3.6.1.2.1.2.2.1.12.1|65|65132
|
||||
1.3.6.1.2.1.2.2.1.12.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.12.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.12.4|65|0
|
||||
1.3.6.1.2.1.2.2.1.12.5|65|0
|
||||
1.3.6.1.2.1.2.2.1.12.6|65|0
|
||||
1.3.6.1.2.1.2.2.1.13.1|65|6
|
||||
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.13.5|65|0
|
||||
1.3.6.1.2.1.2.2.1.13.6|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.14.5|65|0
|
||||
1.3.6.1.2.1.2.2.1.14.6|65|0
|
||||
1.3.6.1.2.1.2.2.1.15.1|65|0
|
||||
1.3.6.1.2.1.2.2.1.15.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.15.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.15.4|65|0
|
||||
1.3.6.1.2.1.2.2.1.15.5|65|0
|
||||
1.3.6.1.2.1.2.2.1.15.6|65|0
|
||||
1.3.6.1.2.1.2.2.1.16.1|65|148787089
|
||||
1.3.6.1.2.1.2.2.1.16.2|65|688
|
||||
1.3.6.1.2.1.2.2.1.16.3|65|598
|
||||
1.3.6.1.2.1.2.2.1.16.4|65|899
|
||||
1.3.6.1.2.1.2.2.1.16.5|65|27529696
|
||||
1.3.6.1.2.1.2.2.1.16.6|65|102886020
|
||||
1.3.6.1.2.1.2.2.1.17.1|65|682791
|
||||
1.3.6.1.2.1.2.2.1.17.2|65|8
|
||||
1.3.6.1.2.1.2.2.1.17.3|65|7
|
||||
1.3.6.1.2.1.2.2.1.17.4|65|11
|
||||
1.3.6.1.2.1.2.2.1.17.5|65|517194
|
||||
1.3.6.1.2.1.2.2.1.17.6|65|535173
|
||||
1.3.6.1.2.1.2.2.1.18.1|65|0
|
||||
1.3.6.1.2.1.2.2.1.18.2|65|0
|
||||
1.3.6.1.2.1.2.2.1.18.3|65|0
|
||||
1.3.6.1.2.1.2.2.1.18.4|65|0
|
||||
1.3.6.1.2.1.2.2.1.18.5|65|0
|
||||
1.3.6.1.2.1.2.2.1.18.6|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.19.5|65|0
|
||||
1.3.6.1.2.1.2.2.1.19.6|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.2.2.1.20.5|65|0
|
||||
1.3.6.1.2.1.2.2.1.20.6|65|0
|
||||
1.3.6.1.2.1.2.2.1.21.1|66|1000
|
||||
1.3.6.1.2.1.2.2.1.21.2|66|1000
|
||||
1.3.6.1.2.1.2.2.1.21.3|66|1000
|
||||
1.3.6.1.2.1.2.2.1.21.4|66|1
|
||||
1.3.6.1.2.1.2.2.1.21.5|66|1000
|
||||
1.3.6.1.2.1.2.2.1.21.6|66|1000
|
||||
1.3.6.1.2.1.2.2.1.22.1|6|0.0.0
|
||||
1.3.6.1.2.1.2.2.1.22.2|6|0.0.0
|
||||
1.3.6.1.2.1.2.2.1.22.3|6|0.0.0
|
||||
1.3.6.1.2.1.2.2.1.22.4|6|0.0.0
|
||||
1.3.6.1.2.1.2.2.1.22.5|6|0.0.0
|
||||
1.3.6.1.2.1.2.2.1.22.6|6|0.0.0
|
||||
1.3.6.1.4.1.12356.121.21.1.1.1.0|4|FXT201E-v7.4.5-build249
|
||||
1.3.6.1.4.1.12356.121.21.1.1.3.0|4|FortiExtender-201E
|
||||
1.3.6.1.4.1.12356.121.21.1.1.5.0|4|FX201ETQ22003767
|
||||
1.3.6.1.4.1.12356.121.21.1.2.1.0|2|3
|
||||
1.3.6.1.4.1.12356.121.21.1.2.2.0|2|20
|
||||
1.3.6.1.4.1.12356.121.21.3.1.1.22.1|4|-61
|
||||
1.3.6.1.4.1.12356.121.21.3.1.1.23.1|4|78
|
||||
1.3.6.1.4.1.12356.121.21.3.1.1.28.1|4|7.8
|
||||
1.3.6.1.4.1.12356.121.21.3.1.1.29.1|4|-99
|
||||
1.3.6.1.4.1.12356.121.21.3.1.1.30.1|4|-18.3
|
||||
1.3.6.1.4.1.12356.121.21.3.1.1.33.1|2|0
|
||||
1.3.6.1.4.1.12356.121.21.3.1.1.35.1|4|81786
|
Loading…
Reference in New Issue
Block a user