mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 16:26:55 +02:00
Merge pull request #2967 from laf/issue-2870
This commit is contained in:
@@ -1,7 +1,16 @@
|
||||
<?php
|
||||
|
||||
if ($config['enable_bgp']) {
|
||||
foreach (dbFetchRows('SELECT * FROM bgpPeers WHERE device_id = ?', array($device['device_id'])) as $peer) {
|
||||
|
||||
$peers = dbFetchRows('SELECT * FROM bgpPeers WHERE device_id = ?', array($device['device_id']));
|
||||
|
||||
if (!empty($peers)) {
|
||||
|
||||
if ($device['os'] != 'junos') {
|
||||
$peer_data_check = snmpwalk_cache_oid($device, 'cbgpPeer2RemoteAs', array(), 'CISCO-BGP4-MIB', $config['mibdir']);
|
||||
}
|
||||
|
||||
foreach ($peers as $peer) {
|
||||
// Poll BGP Peer
|
||||
$peer2 = false;
|
||||
echo 'Checking BGP peer '.$peer['bgpPeerIdentifier'].' ';
|
||||
@@ -9,8 +18,6 @@ if ($config['enable_bgp']) {
|
||||
if (!empty($peer['bgpPeerIdentifier'])) {
|
||||
if (!strstr($peer['bgpPeerIdentifier'], ':') || $device['os'] != 'junos') {
|
||||
// v4 BGP4 MIB
|
||||
// FIXME - needs moved to function
|
||||
$peer_data_check = snmpwalk_cache_oid($device, 'cbgpPeer2RemoteAs', array(), 'CISCO-BGP4-MIB', $config['mibdir']);
|
||||
if (count($peer_data_check) > 0) {
|
||||
$peer2 = true;
|
||||
}
|
||||
@@ -308,3 +315,4 @@ if ($config['enable_bgp']) {
|
||||
echo "\n";
|
||||
} //end foreach
|
||||
} //end if
|
||||
} //end if
|
||||
|
||||
Reference in New Issue
Block a user