func (c *rpmCollector) Collect(client *rpc.Client, ch chan<- prometheus.Metric, labelValues []string) error {
	err := c.collect(client, ch, labelValues)
	if err != nil {
		return err
	}
	return nil
}
Collect collects metrics from JunOS
package rpm
import (
	"github.com/czerwonk/junos_exporter/collector"
	"github.com/czerwonk/junos_exporter/rpc"
	"github.com/prometheus/client_golang/prometheus"
)
const prefix string = "junos_rpm_probe_results_"
var (
	currRTTMinDesc    *prometheus.Desc
	currRTTMaxDesc    *prometheus.Desc
	currRTTAvgDesc    *prometheus.Desc
	currRTTJitterDesc *prometheus.Desc
	currRTTStddevDesc *prometheus.Desc
	currRTTSumDesc    *prometheus.Desc
	totalSentDesc     *prometheus.Desc
	totalReceivedDesc *prometheus.Desc
)
func init() {
	l := []string{"target", "owner", "name", "address", "type", "interface"}
	totalSentDesc = prometheus.NewDesc(prefix+"sent_total", "Number of probes sent within the current test", l, nil)
	totalReceivedDesc = prometheus.NewDesc(prefix+"received_total", "Number of probe responses received within the current test", l, nil)
	currRTTMinDesc = prometheus.NewDesc(prefix+"rtt_min_current", "Minimum RTT for the most recently completed test, in microseconds", l, nil)
	currRTTMaxDesc = prometheus.NewDesc(prefix+"rtt_max_current", "Maximum RTT for the most recently completed test, in microseconds", l, nil)
	currRTTAvgDesc = prometheus.NewDesc(prefix+"rtt_avg_current", "Average RTT for the most recently completed test, in microseconds", l, nil)
	currRTTJitterDesc = prometheus.NewDesc(prefix+"rtt_jitter_current", "Peak-to-peak difference, in microseconds", l, nil)
	currRTTStddevDesc = prometheus.NewDesc(prefix+"rtt_stddev_current", "Standard deviation, in microseconds", l, nil)
	currRTTSumDesc = prometheus.NewDesc(prefix+"rtt_sum_current", "Statistical sum", l, nil)
}
type rpmCollector struct{}
func NewCollector() collector.RPCCollector {
	return &rpmCollector{}
}
func (*rpmCollector) Name() string {
	return "RPM"
}
func (*rpmCollector) Describe(ch chan<- *prometheus.Desc) {
	ch <- totalSentDesc
	ch <- totalReceivedDesc
	ch <- currRTTMinDesc
	ch <- currRTTMaxDesc
	ch <- currRTTAvgDesc
	ch <- currRTTJitterDesc
	ch <- currRTTStddevDesc
	ch <- currRTTSumDesc
}