SuperQ / smokeping_prober

Prometheus style smokeping
Apache License 2.0
554 stars 73 forks source link

Take host label from the pinger for consistency #141

Closed tomhughes closed 6 months ago

tomhughes commented 6 months ago

The update of pro-bing from 0.3.0 to 0.4.0 in #140 pulled in https://github.com/prometheus-community/pro-bing/pull/65 which has changed the meaning of pkt.Addr and causes metrics to be recorded with the IP address as both the host and ip labels.

This causes mismatches with the request metric which still has the host name, and duplicate response metrics as the initial ones are added with the correct host label (but never increment) while the callbacks created duplicate metrics with the IP address as the host label.

This change ensures that the host name from the pinger is used consistently when recording metrics.

SuperQ commented 6 months ago

Hmm, I wonder if we should fix this upstream.