mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 00:11:49 +02:00
Fixed ipv6 bgp polling on junos
This commit is contained in:
@@ -104,7 +104,7 @@ if ($config['enable_bgp']) {
|
|||||||
// FIXME - needs moved to function
|
// FIXME - needs moved to function
|
||||||
//$peer_cmd = $config['snmpwalk'].' -M '.$config['mibdir'].'/junos -m BGP4-V2-MIB-JUNIPER -OUnq -'.$device['snmpver'].' '.snmp_gen_auth($device).' '.$device['hostname'].':'.$device['port'];
|
//$peer_cmd = $config['snmpwalk'].' -M '.$config['mibdir'].'/junos -m BGP4-V2-MIB-JUNIPER -OUnq -'.$device['snmpver'].' '.snmp_gen_auth($device).' '.$device['hostname'].':'.$device['port'];
|
||||||
|
|
||||||
foreach (explode("\n",snmp_get($device,'jnxBgpM2PeerStatus.0.ipv6"','-OUnq','BGP4-V2-MIB-JUNIPER',$config['mibdir'] . "/junos")) as $oid){
|
foreach (explode("\n",snmp_walk($device,'jnxBgpM2PeerStatus.0.ipv6','-OUnq','BGP4-V2-MIB-JUNIPER',$config['mibdir'] . "/junos")) as $oid){
|
||||||
list($peer_oid) = explode(' ', $oid);
|
list($peer_oid) = explode(' ', $oid);
|
||||||
$peer_id = explode('.', $peer_oid);
|
$peer_id = explode('.', $peer_oid);
|
||||||
$junos_v6[implode('.', array_slice($peer_id, 35))] = implode('.', array_slice($peer_id, 18));
|
$junos_v6[implode('.', array_slice($peer_id, 35))] = implode('.', array_slice($peer_id, 18));
|
||||||
|
|||||||
Reference in New Issue
Block a user