Alcatel-Lucent AOS7 bgp fix2 (#13059)

* first

* style

* fix erorr

* fix style again

* fix style again
This commit is contained in:
paulierco
2021-07-21 16:03:21 +03:00
committed by GitHub
parent 39b930e8db
commit c07fcc8029
2 changed files with 12 additions and 10 deletions

View File

@@ -329,7 +329,7 @@ if (\LibreNMS\Config::get('enable_bgp')) {
$peer_identifier = $peer['bgpPeerIdentifier'];
$peer_data = [];
$al_descr = snmpwalk_cache_multi_oid($device, 'alaBgpPeerName', $al_descr, 'ALCATEL-IND1-BGP-MIB', 'aos7', '-OQUs');
$al_peer = snmpwalk_cache_multi_oid($device, 'BgpPeerEntry', $al_peer, 'BGP4-MIB', 'aos7', '-OQUs');
$al_peer = snmpwalk_cache_multi_oid($device, 'BgpPeerEntry', [], 'BGP4-MIB', 'aos7', '-OQUs');
$peer_data['bgpPeerDescr'] = $al_descr[$peer_identifier]['alaBgpPeerName'];
$peer_data['bgpPeerState'] = $al_peer[$peer_identifier]['bgpPeerState'];
$peer_data['bgpPeerAdminStatus'] = $al_peer[$peer_identifier]['bgpPeerAdminStatus'];
@@ -339,7 +339,9 @@ if (\LibreNMS\Config::get('enable_bgp')) {
$peer_data['bgpPeerOutTotalMessages'] = $al_peer[$peer_identifier]['bgpPeerOutTotalMessages'];
$peer_data['bgpPeerFsmEstablishedTime'] = $al_peer[$peer_identifier]['bgpPeerFsmEstablishedTime'];
$peer_data['bgpPeerInUpdateElapsedTime'] = $al_peer[$peer_identifier]['bgpPeerInUpdateElapsedTime'];
$peer_data['bgpPeerLastErrorCode'] = $al_peer[$peer_identifier]['bgpPeerLastErro'];
$error_data = explode(' ', $al_peer[$peer_identifier]['bgpPeerLastError']);
$peer_data['bgpPeerLastErrorCode'] = intval($error_data[0]);
$peer_data['bgpPeerLastErrorSubCode'] = intval($error_data[1]);
} elseif ($device['os_group'] == 'cisco') {
$peer_identifier = $ip_type . '.' . $ip_len . '.' . $bgp_peer_ident;
$mib = 'CISCO-BGP4-MIB';

View File

@@ -79767,8 +79767,8 @@
"bgpPeerRemoteAs": 64600,
"bgpPeerState": "established",
"bgpPeerAdminStatus": "start",
"bgpPeerLastErrorCode": null,
"bgpPeerLastErrorSubCode": null,
"bgpPeerLastErrorCode": 6,
"bgpPeerLastErrorSubCode": 3,
"bgpPeerLastErrorText": null,
"bgpLocalAddr": "0.0.0.0",
"bgpPeerRemoteAddr": "0.0.0.0",
@@ -79789,8 +79789,8 @@
"bgpPeerRemoteAs": 64600,
"bgpPeerState": "established",
"bgpPeerAdminStatus": "start",
"bgpPeerLastErrorCode": null,
"bgpPeerLastErrorSubCode": null,
"bgpPeerLastErrorCode": 6,
"bgpPeerLastErrorSubCode": 3,
"bgpPeerLastErrorText": null,
"bgpLocalAddr": "0.0.0.0",
"bgpPeerRemoteAddr": "0.0.0.0",
@@ -79811,8 +79811,8 @@
"bgpPeerRemoteAs": 64600,
"bgpPeerState": "established",
"bgpPeerAdminStatus": "start",
"bgpPeerLastErrorCode": null,
"bgpPeerLastErrorSubCode": null,
"bgpPeerLastErrorCode": 0,
"bgpPeerLastErrorSubCode": 0,
"bgpPeerLastErrorText": null,
"bgpLocalAddr": "0.0.0.0",
"bgpPeerRemoteAddr": "0.0.0.0",
@@ -79833,8 +79833,8 @@
"bgpPeerRemoteAs": 64600,
"bgpPeerState": "established",
"bgpPeerAdminStatus": "start",
"bgpPeerLastErrorCode": null,
"bgpPeerLastErrorSubCode": null,
"bgpPeerLastErrorCode": 0,
"bgpPeerLastErrorSubCode": 0,
"bgpPeerLastErrorText": null,
"bgpLocalAddr": "0.0.0.0",
"bgpPeerRemoteAddr": "0.0.0.0",