mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
Brocade switches - Added names on fiberchannel ports (#10737)
* Added brocade ports * Create brocade.inc.php * Update functions.php * Update functions.php * Update brocade.inc.php * Try to remove complexity * Removed white space Removed white space * Added testdata * removed temp variable * Update functions.php * Create brocade.inc.php * Added fill ifAlias for fibrechannel ports * Update functions.php * Update brocade.inc.php * Update fabos.json
This commit is contained in:
parent
c69efb3444
commit
a5f53eee2a
@ -39,6 +39,10 @@ foreach ($ports_mapped['maps']['ifIndex'] as $ifIndex => $port_id) {
|
||||
}
|
||||
}
|
||||
|
||||
// Fill ifAlias for fibrechannel ports
|
||||
if ($device['os'] == 'fabos') {
|
||||
require_once 'ports/brocade.inc.php';
|
||||
}
|
||||
|
||||
// New interface detection
|
||||
foreach ($port_stats as $ifIndex => $snmp_data) {
|
||||
|
6
includes/discovery/ports/brocade.inc.php
Normal file
6
includes/discovery/ports/brocade.inc.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
$brocade_stats = snmpwalk_group($device, 'swFCPortName', 'SW-MIB', 1, $brocade_stats);
|
||||
foreach ($brocade_stats as $index => $port) {
|
||||
$index_brocade=$index + 1073741823;
|
||||
$port_stats[$index_brocade]['ifAlias'] = $brocade_stats[$index]['swFCPortName'];
|
||||
}
|
@ -306,6 +306,10 @@ if ($device['os'] === 'f5' && (version_compare($device['version'], '11.2.0', '>=
|
||||
}
|
||||
}
|
||||
|
||||
if ($device['os'] == 'fabos') {
|
||||
require_once 'ports/brocade.inc.php';
|
||||
}
|
||||
|
||||
if ($device['os'] == 'procera') {
|
||||
require_once 'ports/procera.inc.php';
|
||||
}
|
||||
|
8
includes/polling/ports/brocade.inc.php
Normal file
8
includes/polling/ports/brocade.inc.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
$brocade_stats = snmpwalk_group($device, 'swFCPortName', 'SW-MIB', 1, $brocade_stats);
|
||||
|
||||
foreach ($brocade_stats as $index => $port) {
|
||||
$index_brocade=$index + 1073741823;
|
||||
$port_stats[$index_brocade]['ifAlias'] = $brocade_stats[$index]['swFCPortName'];
|
||||
}
|
22974
tests/data/fabos.json
22974
tests/data/fabos.json
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user