Saturday, August 20, 2011

Monitoring BGP with Reconnoiter

Here's another quick Reconnoiter tip for monitoring BGP on Cisco routers. You'll need to make sure that the IETF standard BGP4-MIB and the Cisco CISCO-BGP4-MIB are installed where net-snmp can find them. Then add the following XML to your noit.conf file.

    <bgp4 module="snmp" period="60000" timeout="15000">
      <config>
        <community>public</community>
        <oid_peer_identifier>BGP4-MIB::bgpPeerIdentifier.%[:ccns:name]</oid_peer_identifier>
        <oid_peer_state>BGP4-MIB::bgpPeerState.%[:ccns:name]</oid_peer_state>
        <oid_peer_admin_status>BGP4-MIB::bgpPeerAdminStatus.%[:ccns:name]</oid_peer_admin_status>
        <oid_peer_negotiated_version>BGP4-MIB::bgpPeerNegotiatedVersion.%[:ccns:name]</oid_peer_negotiated_version>
        <oid_peer_local_addr>BGP4-MIB::bgpPeerLocalAddr.%[:ccns:name]</oid_peer_local_addr>
        <oid_peer_remote_addr>BGP4-MIB::bgpPeerRemoteAddr.%[:ccns:name]</oid_peer_remote_addr>
        <oid_peer_remote_as>BGP4-MIB::bgpPeerRemoteAs.%[:ccns:name]</oid_peer_remote_as>
        <oid_peer_in_updates>BGP4-MIB::bgpPeerInUpdates.%[:ccns:name]</oid_peer_in_updates>
        <oid_peer_out_updates>BGP4-MIB::bgpPeerOutUpdates.%[:ccns:name]</oid_peer_out_updates>
        <oid_peer_in_total_messages>BGP4-MIB::bgpPeerInTotalMessages.%[:ccns:name]</oid_peer_in_total_messages>
        <oid_peer_out_total_messages>BGP4-MIB::bgpPeerOutTotalMessages.%[:ccns:name]</oid_peer_out_total_messages>
        <oid_peer_last_error>BGP4-MIB::bgpPeerLastError.%[:ccns:name]</oid_peer_last_error>
        <oid_peer_fsm_established_transitions>BGP4-MIB::bgpPeerFsmEstablishedTransitions.%[:ccns:name]</oid_peer_fsm_established_transitions>
        <oid_peer_fsm_established_time>BGP4-MIB::bgpPeerFsmEstablishedTime.%[:ccns:name]</oid_peer_fsm_established_time>
        <oid_peer_connect_retry_interval>BGP4-MIB::bgpPeerConnectRetryInterval.%[:ccns:name]</oid_peer_connect_retry_interval>
        <oid_peer_hold_time>BGP4-MIB::bgpPeerHoldTime.%[:ccns:name]</oid_peer_hold_time>
        <oid_peer_keep_alive>BGP4-MIB::bgpPeerKeepAlive.%[:ccns:name]</oid_peer_keep_alive>
        <oid_peer_hold_time_configured>BGP4-MIB::bgpPeerHoldTimeConfigured.%[:ccns:name]</oid_peer_hold_time_configured>
        <oid_peer_keep_alive_configured>BGP4-MIB::bgpPeerKeepAliveConfigured.%[:ccns:name]</oid_peer_keep_alive_configured>
        <oid_peer_accepted_prefixes_ipv4_unicast>CISCO-BGP4-MIB::cbgpPeerAcceptedPrefixes.%[:ccns:name].ipv4.unicast</oid_peer_accepted_prefixes_ipv4_unicast>
        <oid_peer_accepted_prefixes_ipv6_unicast>CISCO-BGP4-MIB::cbgpPeerAcceptedPrefixes.%[:ccns:name].ipv6.unicast</oid_peer_accepted_prefixes_ipv6_unicast>
        <oid_peer_denied_prefixes_ipv4_unicast>CISCO-BGP4-MIB::cbgpPeerDeniedPrefixes.%[:ccns:name].ipv4.unicast</oid_peer_denied_prefixes_ipv4_unicast>
        <oid_peer_denied_prefixes_ipv6_unicast>CISCO-BGP4-MIB::cbgpPeerDeniedPrefixes.%[:ccns:name].ipv6.unicast</oid_peer_denied_prefixes_ipv6_unicast>
        <oid_peer_prefix_admin_limit_ipv4_unicast>CISCO-BGP4-MIB::cbgpPeerPrefixAdminLimit.%[:ccns:name].ipv4.unicast</oid_peer_prefix_admin_limit_ipv4_unicast>
        <oid_peer_prefix_admin_limit_ipv6_unicast>CISCO-BGP4-MIB::cbgpPeerPrefixAdminLimit.%[:ccns:name].ipv6.unicast</oid_peer_prefix_admin_limit_ipv6_unicast>
        <oid_peer_prefix_threshold_ipv4_unicast>CISCO-BGP4-MIB::cbgpPeerPrefixThreshold.%[:ccns:name].ipv4.unicast</oid_peer_prefix_threshold_ipv4_unicast>
        <oid_peer_prefix_threshold_ipv6_unicast>CISCO-BGP4-MIB::cbgpPeerPrefixThreshold.%[:ccns:name].ipv6.unicast</oid_peer_prefix_threshold_ipv6_unicast>
        <oid_peer_prefix_clear_threshold_ipv4_unicast>CISCO-BGP4-MIB::cbgpPeerPrefixClearThreshold.%[:ccns:name].ipv4.unicast</oid_peer_prefix_clear_threshold_ipv4_unicast>
        <oid_peer_prefix_clear_threshold_ipv6_unicast>CISCO-BGP4-MIB::cbgpPeerPrefixClearThreshold.%[:ccns:name].ipv6.unicast</oid_peer_prefix_clear_threshold_ipv6_unicast>
        <oid_peer_advertised_prefixes_ipv4_unicast>CISCO-BGP4-MIB::cbgpPeerAdvertisedPrefixes.%[:ccns:name].ipv4.unicast</oid_peer_advertised_prefixes_ipv4_unicast>
        <oid_peer_advertised_prefixes_ipv6_unicast>CISCO-BGP4-MIB::cbgpPeerAdvertisedPrefixes.%[:ccns:name].ipv6.unicast</oid_peer_advertised_prefixes_ipv6_unicast>
        <oid_peer_suppressed_prefixes_ipv4_unicast>CISCO-BGP4-MIB::cbgpPeerSuppressedPrefixes.%[:ccns:name].ipv4.unicast</oid_peer_suppressed_prefixes_ipv4_unicast>
        <oid_peer_suppressed_prefixes_ipv6_unicast>CISCO-BGP4-MIB::cbgpPeerSuppressedPrefixes.%[:ccns:name].ipv6.unicast</oid_peer_suppressed_prefixes_ipv6_unicast>
        <oid_peer_withdrawn_prefixes_ipv4_unicast>CISCO-BGP4-MIB::cbgpPeerWithdrawnPrefixes.%[:ccns:name].ipv4.unicast</oid_peer_withdrawn_prefixes_ipv4_unicast>
        <oid_peer_withdrawn_prefixes_ipv6_unicast>CISCO-BGP4-MIB::cbgpPeerWithdrawnPrefixes.%[:ccns:name].ipv6.unicast</oid_peer_withdrawn_prefixes_ipv6_unicast>
      </config>
      <rtr1 target="172.16.0.1">
        <check uuid="a75d0260-0631-461d-ac0f-21a3ebd0ae02" name="rtr1:bgp:peername::192.168.0.1"/>
      </rtr1>
    </bgp4>

Above, 192.168.0.1 is the IP address of the peer router and 172.16.0.1 is the IP address of your router.

0 comments: