func NewCollector(logicalSystem string) collector.RPCCollector {
	return &bgpCollector{LogicalSystem: logicalSystem}
}
NewCollector creates a new collector
package bgp
import (
	"github.com/czerwonk/junos_exporter/collector"
	"github.com/czerwonk/junos_exporter/rpc"
	"github.com/prometheus/client_golang/prometheus"
	"strings"
)
const prefix string = "junos_bgp_session_"
var (
	upDesc                 *prometheus.Desc
	receivedPrefixesDesc   *prometheus.Desc
	acceptedPrefixesDesc   *prometheus.Desc
	rejectedPrefixesDesc   *prometheus.Desc
	activePrefixesDesc     *prometheus.Desc
	advertisedPrefixesDesc *prometheus.Desc
	inputMessagesDesc      *prometheus.Desc
	outputMessagesDesc     *prometheus.Desc
	flapsDesc              *prometheus.Desc
)
func init() {
	l := []string{"target", "asn", "ip", "description", "group"}
	upDesc = prometheus.NewDesc(prefix+"up", "Session is up (1 = Established)", l, nil)
	inputMessagesDesc = prometheus.NewDesc(prefix+"messages_input_count", "Number of received messages", l, nil)
	outputMessagesDesc = prometheus.NewDesc(prefix+"messages_output_count", "Number of transmitted messages", l, nil)
	flapsDesc = prometheus.NewDesc(prefix+"flap_count", "Number of session flaps", l, nil)
	l = append(l, "table")
	receivedPrefixesDesc = prometheus.NewDesc(prefix+"prefixes_received_count", "Number of received prefixes", l, nil)
	acceptedPrefixesDesc = prometheus.NewDesc(prefix+"prefixes_accepted_count", "Number of accepted prefixes", l, nil)
	rejectedPrefixesDesc = prometheus.NewDesc(prefix+"prefixes_rejected_count", "Number of rejected prefixes", l, nil)
	activePrefixesDesc = prometheus.NewDesc(prefix+"prefixes_active_count", "Number of active prefixes (best route in RIB)", l, nil)
	advertisedPrefixesDesc = prometheus.NewDesc(prefix+"prefixes_advertised_count", "Number of prefixes announced to peer", l, nil)
}
type bgpCollector struct {
	LogicalSystem string
}