fix bgp stuff (tell it never to show units, must have appeared in new BGP mib :>)

git-svn-id: http://www.observium.org/svn/observer/trunk@1587 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-31 19:16:00 +00:00
parent ec74c22e3b
commit 386846085e

View File

@@ -16,7 +16,7 @@ if (!strstr($peer['bgpPeerIdentifier'],':'))
{
# v4 BGP4 MIB
## FIX ME - needs moved to function
$peer_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -m BGP4-MIB -Ovq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
$peer_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -m BGP4-MIB -OUvq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
$peer_cmd .= "bgpPeerState." . $peer['bgpPeerIdentifier'] . " bgpPeerAdminStatus." . $peer['bgpPeerIdentifier'] . " bgpPeerInUpdates." . $peer['bgpPeerIdentifier'] . " bgpPeerOutUpdates." . $peer['bgpPeerIdentifier'] . " bgpPeerInTotalMessages." . $peer['bgpPeerIdentifier'] . " ";
$peer_cmd .= "bgpPeerOutTotalMessages." . $peer['bgpPeerIdentifier'] . " bgpPeerFsmEstablishedTime." . $peer['bgpPeerIdentifier'] . " bgpPeerInUpdateElapsedTime." . $peer['bgpPeerIdentifier'] . " ";
$peer_cmd .= "bgpPeerLocalAddr." . $peer['bgpPeerIdentifier'] . "";
@@ -33,7 +33,7 @@ if ($device['os'] == "junos")
{
echo "\nCaching Oids...";
## FIX ME - needs moved to function
$peer_cmd = $config['snmpwalk'] . " -M ".$config['mibdir'] . "/junos -m BGP4-V2-MIB-JUNIPER -Onq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'];
$peer_cmd = $config['snmpwalk'] . " -M ".$config['mibdir'] . "/junos -m BGP4-V2-MIB-JUNIPER -OUnq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'];
$peer_cmd .= " jnxBgpM2PeerStatus.0.ipv6";
foreach (explode("\n",trim(`$peer_cmd`)) as $oid)
{
@@ -43,7 +43,7 @@ if ($device['os'] == "junos")
}
}
## FIX ME - move to function (and clean up, wtf?)
$peer_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . "/junos -m BGP4-V2-MIB-JUNIPER -Ovq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'];
$peer_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . "/junos -m BGP4-V2-MIB-JUNIPER -OUvq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'];
$peer_cmd .= " jnxBgpM2PeerState.0.ipv6." . $junos_v6[$peer_ip];
$peer_cmd .= " jnxBgpM2PeerStatus.0.ipv6." . $junos_v6[$peer_ip]; # Should be jnxBgpM2CfgPeerAdminStatus but doesn't seem to be implemented?
$peer_cmd .= " jnxBgpM2PeerInUpdates.0.ipv6." . $junos_v6[$peer_ip];