Documentation ¶
Index ¶
- func GetExporterName() string
- func GetRevision() string
- func GetVersion() string
- func GetVersionBuildContext() string
- func GetVersionInfo() string
- func IsConnectionError(err error) bool
- type Exporter
- type Options
- type RouterNode
- func (n *RouterNode) Collect(ch chan<- prometheus.Metric)
- func (n *RouterNode) Describe(ch chan<- *prometheus.Desc)
- func (n *RouterNode) GatherMetrics()
- func (n *RouterNode) GetMetricsTable() string
- func (n *RouterNode) GetPeers()
- func (n *RouterNode) GetRibCounters()
- func (n *RouterNode) IncrementErrorCounter()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetVersionBuildContext ¶
func GetVersionBuildContext() string
GetVersionBuildContext returns exporter build context.
func IsConnectionError ¶
IsConnectionError checks whether it is connectivity issue.
Types ¶
type Exporter ¶
type Exporter struct { sync.RWMutex Node *RouterNode Tokens map[string]bool // contains filtered or unexported fields }
Exporter collects GoBGP data from the given server and exports them using the prometheus metrics package.
func NewExporter ¶
NewExporter returns an initialized Exporter.
func (*Exporter) AddAuthenticationToken ¶
AddAuthenticationToken adds an authentication token for accessing the exporter itself.
func (*Exporter) GetPollInterval ¶
GetPollInterval returns exporters minimal polling/scraping interval.
func (*Exporter) Scrape ¶
func (e *Exporter) Scrape(w http.ResponseWriter, r *http.Request)
Scrape scrapes individual nodes.
func (*Exporter) SetPollInterval ¶
SetPollInterval sets exporter's minimal polling/scraping interval.
type RouterNode ¶
RouterNode is an instance of a GoBGP router.
func NewRouterNode ¶
func NewRouterNode(addr string, timeout int, tlsConfig *tls.Config, logger log.Logger) (*RouterNode, error)
NewRouterNode creates an instance of RouterNode.
func (*RouterNode) Collect ¶
func (n *RouterNode) Collect(ch chan<- prometheus.Metric)
Collect implements prometheus.Collector.
func (*RouterNode) Describe ¶
func (n *RouterNode) Describe(ch chan<- *prometheus.Desc)
Describe describes all the metrics ever exported by the exporter. It implements prometheus.Collector.
func (*RouterNode) GatherMetrics ¶
func (n *RouterNode) GatherMetrics()
GatherMetrics collect data from a GoBGP router and stores them as Prometheus metrics.
func (*RouterNode) GetMetricsTable ¶
func (n *RouterNode) GetMetricsTable() string
GetMetricsTable returns markdown-formatted table with the name, help, and labels of the metrics produced by the exporter.
func (*RouterNode) GetPeers ¶
func (n *RouterNode) GetPeers()
GetPeers collects information about BGP peers.
func (*RouterNode) GetRibCounters ¶
func (n *RouterNode) GetRibCounters()
GetRibCounters collects BGP routing information base (RIB) related metrics.
func (*RouterNode) IncrementErrorCounter ¶
func (n *RouterNode) IncrementErrorCounter()
IncrementErrorCounter increases the counter of failed queries to a network node.