% is not a valid character in a metric name for Prometheus but some hosts have sensors like P1 Therm Ctrl %. This would convert it to P1 Therm Ctrl pct which makes Prometheus happy. pct is the usual abbreviation of percent.
I think when just using strings.Replace a bare % is fine like this but it might have to be %% (though I think part only goes for the *print family of functions)
%
is not a valid character in a metric name for Prometheus but some hosts have sensors likeP1 Therm Ctrl %
. This would convert it toP1 Therm Ctrl pct
which makes Prometheus happy.pct
is the usual abbreviation of percent.