banshee/network-collection/network/snmp/
bgp-peers
The BGP peers of a router by SNMP (BGP4-MIB): the state of each session, its remote AS, its time established and its flaps.
by banshee1 installation2 versions
BGP peers of a router, by SNMP
Returns, for each BGP peer of a router, the state of its session, the AS of the peer, how long the session has been established, and how many times it has come up. Four watches are offered: a session down, a session that flaps, a session established recently, and a peer missing.
How it works
The collector reads bgpPeerTable (BGP4-MIB, RFC 4273). A peer is named by its address (192.0.2.1).
- The state is
bgpPeerStatein words:idle,connect,active,opensent,openconfirm,established. A peer the administrator has shut (bgpPeerAdminStatusstop) readsstopped, so that it does not pass for a peer that fell. - "Session down" is critical for any state other than
establishedandstopped. - The time established is
bgpPeerFsmEstablishedTime, in minutes, for an established session only. - The times established is
bgpPeerFsmEstablishedTransitions, a counter of the times the session came up: "Session flapping" raises when it grows by more than 2 in an hour.
The collector only reads: SNMP sends nothing but reads.
Prerequisites
- The SNMP agent of the router enabled, reachable from the poller (UDP 161), its access restricted to the poller.
- The view granted to the poller includes
bgp(.1.3.6.1.2.1.15). - Read-only access, SNMPv2c or SNMPv3, set on the host or one of its folders (
protocol:snmp:*variables). - Versions: any router whose agent serves BGP4-MIB, whatever its brand. A router without BGP, or that does not serve it, stops the collector as misconfigured.
Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
state | Session state | — | yes, per peer |
remote-as | Remote AS | — | yes, per peer |
established-for | Time established | min | yes, per peer |
established-count | Times established | — | yes, per peer |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
down | Session down | expected value, on state | critical when the state is neither established nor stopped | yes |
flapping | Session flapping | increase, on established-count | warning beyond 2 in 1 h | yes |
recently-established | Session established recently | below a threshold, on established-for | warning below 15 min | no |
missing | Missing peer | expected instances, on state | no peer named: it raises nothing until addresses are set on the probe | no |
Limits
- BGP4-MIB lists IPv4 peers only: an IPv6 peer is not seen. Its successor, BGP4-V2-MIB, is a draft that each vendor serves under its own number.
- BGP4-MIB counts no prefixes: the prefixes received from a peer are in each vendor's MIB (CISCO-BGP4-MIB, the Juniper and Arista ones), not read here.
- A router with several routing instances (VRF) usually lists in BGP4-MIB only the peers of its default instance.
- A peer removed from the configuration leaves the table: only "Missing peer" sees it.