bird_exporter/client/client.go
zhanghao b09cde3210 Add bgp state metrics
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
2021-07-02 05:14:30 -04:00

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)
}