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 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) }