From b1d6605e8f6a61e5ef85da0782c1d2dc60353403 Mon Sep 17 00:00:00 2001 From: Martynas Pumputis Date: Fri, 21 Oct 2016 15:58:10 +0100 Subject: [PATCH] Remove inaccurate Prometheus metrics The metrics include: - weave_packets_total - weave_bytes_total The problem with those metrics is that fastdp periodically flushes flows including their stats thus makes the current implementation of the metrics unreliable. --- prog/weaver/metrics.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/prog/weaver/metrics.go b/prog/weaver/metrics.go index fcdd0f2d..5ffee13e 100644 --- a/prog/weaver/metrics.go +++ b/prog/weaver/metrics.go @@ -76,18 +76,6 @@ var metrics []metric = []metric{ ch <- intGauge(desc, metrics.Flows) } }}, - {desc("weave_packets_total", "Number of packets transferred.", "flow"), - func(s WeaveStatus, desc *prometheus.Desc, ch chan<- prometheus.Metric) { - if metrics := fastDPMetrics(s); metrics != nil { - ch <- uint64Counter(desc, metrics.TotalPackets, "total") - } - }}, - {desc("weave_bytes_total", "Number of bytes transferred.", "flow"), - func(s WeaveStatus, desc *prometheus.Desc, ch chan<- prometheus.Metric) { - if metrics := fastDPMetrics(s); metrics != nil { - ch <- uint64Counter(desc, metrics.TotalBytes, "total") - } - }}, } func fastDPMetrics(s WeaveStatus) *weave.FastDPMetrics {