func (*BGPL2VPNCollector) Help() string {
	return "Collect BGP L2VPN Metrics"
}
Help describes the metrics this collector scrapes. Used to populate flag help.
package collector
import (
	"encoding/json"
	"fmt"
	"regexp"
	"strconv"
	"strings"
	"sync"
	"github.com/prometheus/client_golang/prometheus"
	kingpin "gopkg.in/alecthomas/kingpin.v2"
)
var (
	bgpSubsystem         = "bgp"
	bgpPeerMetricPrefix  = "bgp_peer"
	bgpL2vpnMetricPrefix = "bgp_l2vpn_evpn"
	bgpDesc      map[string]*prometheus.Desc
	bgpL2vpnDesc map[string]*prometheus.Desc
	bgpErrors           = []error{}
	totalBGPErrors      = 0.0
	bgp6Errors          = []error{}
	totalBGP6Errors     = 0.0
	bgpL2VPNErrors      = []error{}
	totalBGPL2VPNErrors = 0.0
	bgpPeerTypes          = kingpin.Flag("collector.bgp.peer-types", "Enable the frr_bgp_peer_types_up metric (default: disabled).").Default("False").Bool()
	frrBGPDescKey         = kingpin.Flag("collector.bgp.peer-types.keys", "Select the keys from the JSON formatted BGP peer description of which the values will be used with the frr_bgp_peer_types_up metric. Supports multiple values (default: type).").Default("type").Strings()
	bgpPeerDescs          = kingpin.Flag("collector.bgp.peer-descriptions", "Add the value of the desc key from the JSON formatted BGP peer description as a label to peer metrics. (default: disabled).").Default("False").Bool()
	bgpPeerDescsText      = kingpin.Flag("collector.bgp.peer-descriptions.plain-text", "Use the full text field of the BGP peer description instead of the value of the JSON formatted desc key (default: disabled).").Default("False").Bool()
	bgpAdvertisedPrefixes = kingpin.Flag("collector.bgp.advertised-prefixes", "Enables the frr_exporter_bgp_prefixes_advertised_count_total metric which exports the number of advertised prefixes to a BGP peer. This is an option for older versions of FRR that don't have PfxSent field (default: disabled).").Default("False").Bool()
)
type BGPCollector struct{}
func NewBGPCollector() *BGPCollector {
	return &BGPCollector{}
}
func (*BGPCollector) Name() string {
	return bgpSubsystem
}
func (*BGPCollector) Help() string {
	return "Collect BGP Metrics"
}
func (*BGPCollector) EnabledByDefault() bool {
	return true
}
func (*BGPCollector) Describe(ch chan<- *prometheus.Desc) {
	for _, desc := range getBgpDesc() {
		ch <- desc
	}
}
func (c *BGPCollector) Collect(ch chan<- prometheus.Metric) {
	bgpErrors = []error{}
	collectBGP(ch, "ipv4")
}
func (*BGPCollector) CollectErrors() []error {
	return bgpErrors
}
func (*BGPCollector) CollectTotalErrors() float64 {
	return totalBGPErrors
}
type BGP6Collector struct{}
func NewBGP6Collector() *BGP6Collector {
	return &BGP6Collector{}
}
func (*BGP6Collector) Name() string {
	return bgpSubsystem + "6"
}
func (*BGP6Collector) Help() string {
	return "Collect BGP IPv6 Metrics"
}
func (*BGP6Collector) EnabledByDefault() bool {
	return false
}
func (*BGP6Collector) Describe(ch chan<- *prometheus.Desc) {
	for _, desc := range getBgpDesc() {
		ch <- desc
	}
}
func (c *BGP6Collector) Collect(ch chan<- prometheus.Metric) {
	bgp6Errors = []error{}
	collectBGP(ch, "ipv6")
}
func (*BGP6Collector) CollectErrors() []error {
	return bgp6Errors
}
func (*BGP6Collector) CollectTotalErrors() float64 {
	return totalBGP6Errors
}
type BGPL2VPNCollector struct{}
func NewBGPL2VPNCollector() *BGPL2VPNCollector {
	return &BGPL2VPNCollector{}
}
func (*BGPL2VPNCollector) Name() string {
	return bgpSubsystem + "l2vpn"
}