This patch adds bgp state metrics as follows: http://XXX:9324/metrics bird_bgp_state{name="uplink0",proto="BGP",state="Active"} 1 bird_bgp_state{name="uplink1",proto="BGP",state="Idle"} 1
17 lines
540 B
Go
17 lines
540 B
Go
package client
|
|
|
|
import "github.com/czerwonk/bird_exporter/protocol"
|
|
|
|
// Client retrieves information from Bird routing daemon
|
|
type Client interface {
|
|
|
|
// GetProtocols retrieves protocol information and statistics from bird
|
|
GetProtocols() ([]*protocol.Protocol, error)
|
|
|
|
// GetOSPFAreas retrieves OSPF specific information from bird
|
|
GetOSPFAreas(protocol *protocol.Protocol) ([]*protocol.OspfArea, error)
|
|
|
|
// GetBGPStates retrieves BGP state information from bird
|
|
GetBGPStates(protocol *protocol.Protocol) (*protocol.BgpState, error)
|
|
}
|