From 5652146b7a5c16f4c58706321b963bf6ea406dce Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 3 Sep 2009 15:13:53 +0000 Subject: [PATCH] junos support updates (add BGP collection) git-svn-id: http://www.observium.org/svn/observer/trunk@460 61d68cd4-352d-0410-923a-c4978735b2b8 --- discovery.php | 5 +++++ includes/discovery/bgp-peers.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/discovery.php b/discovery.php index 591862401..509d41a7a 100755 --- a/discovery.php +++ b/discovery.php @@ -63,6 +63,11 @@ while ($device = mysql_fetch_array($device_query)) { } + if($device['os'] == "JunOS") { + include("includes/discovery/bgp-peers.php"); + } + + if($device['os'] == "IOS" || $device['os'] == "IOS XE") { include("includes/discovery/cisco-vlans.php"); include("includes/discovery/cisco-physical.php"); diff --git a/includes/discovery/bgp-peers.php b/includes/discovery/bgp-peers.php index 28aa245dd..4219625bd 100755 --- a/includes/discovery/bgp-peers.php +++ b/includes/discovery/bgp-peers.php @@ -19,8 +19,8 @@ $peers = trim(str_replace("BGP4-MIB::bgpPeerRemoteAs.", "", `$peers_cmd`)); foreach (explode("\n", $peers) as $peer) { - if($peer) { - list($peer_ip, $peer_as) = split(" ", $peer); + list($peer_ip, $peer_as) = split(" ", $peer); + if($peer && $peer_ip != "0.0.0.0") { $peerlist[] = $device['device_id'] ." $peer_ip";