[pkg-go] Bug#920827: Error parsing smartmon.prom after upgrade

Antoine Beaupré anarcat at debian.org
Wed Jan 30 17:42:09 GMT 2019

On 2019-01-30 11:04:35, Antoine Beaupré wrote:
> On 2019-01-30 16:00:18, Martín Ferrari wrote:
>> Hi Antoine,
>> On 29/01/2019 17:50, Antoine Beaupre wrote:
>>> I started seeing this in my logs on buster recently:
>>> jan 29 12:48:02 curie prometheus-node-exporter[940]: time="2019-01-29T12:48:02-05:00" level=error msg="Error parsing \"/var/lib/prometheus/node-exporter/smartmon.prom\": text format parsing error in line 54: unknown metric type \"type is not sat, scsi or megaraid but usbsunplus gauge\"" source="textfile.go:211" 
>>> It's strange because "line 54" of that file is:
>>> smartmon_end_to_end_error_threshold{disk="/dev/sdb",type="sat",smart_id="184"} 0
>>> and type *is* "sat, scsi or megaraid" (it's "sat") and most definitely
>>> not "usbsunplus". what's going on here?
>> That's weird.. But I'd bet the error refers to another line in that
>> file. After all, node-exporter has no idea of sat, scsi, or megaraid. I
>> think that must be some text in the file. Could you send the contents of it?
> Sure, attached.

Hmm... I just noticed I don't see the errors in the logs anymore, so
it's quite likely you won't be able to reproduce with the given file,
which might explain why I couldn't find a problem with the given line...

Is it possible that the exporter is trying to read the file while it's
being written, and therefore getting an incomplete record?

If the file is not written atomically (ie. written to a tmp and moved
into place), then it's quite likely such race conditions will
(eventually) occur...

Music gives a soul to the universe, wings to the mind, flight to the
imagination and life to everything
                         - Plato

More information about the Pkg-go-maintainers mailing list