# Peer
# This table contains one entry per neighbor (BGP peer) and information about the connections with BGP peers.
metrics:
  - MIB: BGP4-MIB
    table:
      name: bgpPeerTable
      OID: 1.3.6.1.2.1.15.3
    symbols:
      - OID: 1.3.6.1.2.1.15.3.1.3
        name: bgpPeerAdminStatus
        chart_meta:
          description: The desired state of the BGP connection
          family: 'Network/Routing/BGP/Peer/Admin/Status'
          unit: "{status}"
        mapping:
          1: stop
          2: start
      - OID: 1.3.6.1.2.1.15.3.1.2
        name: bgpPeerState
        chart_meta:
          description: The BGP peer connection state
          family: 'Network/Routing/BGP/Peer/Connection/Status'
          unit: "{status}"
        mapping:
          1: idle
          2: connect
          3: active
          4: opensent
          5: openconfirm
          6: established
      - OID: 1.3.6.1.2.1.15.3.1.12
        name: bgpPeerInTotalMessages
        chart_meta:
          description: The total number of messages received from the remote peer on this connection
          family: 'Network/Routing/BGP/Peer/Message/Total/In'
          unit: "{message}"
      - OID: 1.3.6.1.2.1.15.3.1.13
        name: bgpPeerOutTotalMessages
        chart_meta:
          description: The total number of messages transmitted to the remote peer on this connection
          family: 'Network/Routing/BGP/Peer/Message/Total/Out'
          unit: "{message}"
      - OID: 1.3.6.1.2.1.15.3.1.10
        name: bgpPeerInUpdates
        chart_meta:
          description: The number of BGP UPDATE messages received on this connection
          family: 'Network/Routing/BGP/Peer/Message/Update/In'
          unit: "{message}"
      - OID: 1.3.6.1.2.1.15.3.1.11
        name: bgpPeerOutUpdates
        chart_meta:
          description: The number of BGP UPDATE messages transmitted on this connection
          family: 'Network/Routing/BGP/Peer/Message/Update/Out'
          unit: "{message}"
      - OID: 1.3.6.1.2.1.15.3.1.15
        name: bgpPeerFsmEstablishedTransitions
        chart_meta:
          description: The total number of times the BGP FSM transitioned into the established state
          family: 'Network/Routing/BGP/Peer/FSM/Transition/Established/Count'
          unit: "{transition}"
      - OID: 1.3.6.1.2.1.15.3.1.16
        name: bgpPeerFsmEstablishedTime
        chart_meta:
          description: Time in seconds this peer has been in the Established state or since last in Established state
          family: 'Network/Routing/BGP/Peer/FSM/Duration/Established'
          unit: "s"
    metric_tags:
      - tag: remote_as
        symbol:
          OID: 1.3.6.1.2.1.15.3.1.9
          name: bgpPeerRemoteAs
      - tag: neighbor
        symbol:
          OID: 1.3.6.1.2.1.15.3.1.7
          name: bgpPeerRemoteAddr
      - tag: bgp_version
        symbol:
          OID: 1.3.6.1.2.1.15.3.1.4
          name: bgpPeerNegotiatedVersion
