Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package metrics
import (
"time"
bnet "github.com/bio-routing/bio-rd/net"
)
// BGPPeerMetrics provides metrics for one BGP session
type BGPPeerMetrics struct {
// IP is the remote IP of the peer
IP bnet.IP
// ASN is the ASN of the peer
ASN uint32
// LocalASN is our local ASN
LocalASN uint32
// VRF is the name of the VRF the peer is configured in
VRF string
// Since is the time the session was established
Since time.Time
// State of the BGP session (Down = 0, Idle = 1, Connect = 2, Active = 3, OpenSent = 4, OpenConfirm = 5, Established = 6)
State uint8
// Up returns if the session is established
Up bool
// UpdatesReceived is the number of update messages received on this session
UpdatesReceived uint64
// UpdatesReceived is the number of update messages we sent on this session
UpdatesSent uint64
// AddressFamilies provides metrics on AFI/SAFI level
AddressFamilies []*BGPAddressFamilyMetrics
}