From 1e1bf5b84744dbb2a70cd258f69d0e9e109302be Mon Sep 17 00:00:00 2001 From: SuperQ Date: Wed, 12 Jul 2023 16:16:01 +0200 Subject: [PATCH 1/2] Ignore network read timeout errors Network timeout errors are handled by the pinger with an exponential backoff. We can ignore these errors. Fixes: https://github.com/SuperQ/smokeping_prober/issues/114 Signed-off-by: SuperQ --- collector.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/collector.go b/collector.go index 3e5db20..ed0b41e 100644 --- a/collector.go +++ b/collector.go @@ -15,6 +15,8 @@ package main import ( + "net" + "github.com/prometheus-community/pro-bing" "github.com/go-kit/log/level" @@ -110,6 +112,12 @@ func NewSmokepingCollector(pingers *[]*probing.Pinger, pingResponseSeconds prome stats.AvgRtt, "max_rtt", stats.MaxRtt, "stddev_rtt", stats.StdDevRtt) } pinger.OnRecvError = func(err error) { + if neterr, ok := err.(*net.OpError); ok { + if neterr.Timeout() { + // Ignore read timeout errors, these are handled by the pinger. + return + } + } pingRecvErrors.Inc() level.Debug(logger).Log("msg", "Error receiving packet", "error", err) } From 9582c1a05753d0654ca892a022749ec6f1fedb41 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Wed, 12 Jul 2023 16:18:39 +0200 Subject: [PATCH 2/2] Release v0.7.1 * [BUGFIX] Ignore network read timeout errors #115 Signed-off-by: SuperQ --- CHANGELOG.md | 4 ++++ VERSION | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db5de0a..9ea2e51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ * [ENHANCEMENT] * [BUGFIX] +## 0.7.1 / 2023-06-12 + +* [BUGFIX] Ignore network read timeout errors #115 + ## 0.7.0 / 2023-07-10 * [FEATURE] Make source ip configurable #83 diff --git a/VERSION b/VERSION index faef31a..39e898a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.7.0 +0.7.1