prometheus / node_exporter

Exporter for machine metrics
https://prometheus.io/
Apache License 2.0
11.03k stars 2.34k forks source link

Error when reading same metrics from multiple files, one with and one without a HELP entry #3052

Open Finomosec opened 3 months ago

Finomosec commented 3 months ago

Host operating system: output of uname -a

Linux master 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 1.8.0 (branch: master, revision: cf0dffe8dce4985132440290d3278373f70f8493)
  build user:       frederic@master
  build date:       20240509-09:40:57
  go version:       go1.22.2
  platform:         linux/amd64
  tags:             unknown

node_exporter command line flags

/usr/local/bin/node_exporter --collector.textfile.directory=/var/metrics/node_exporter

node_exporter log output

* [from Gatherer #2] collected metric my_metric gauge:{value:1} has help \"Metric read from /var/metrics/node_exporter/data1.prom, /var/metrics/node_exporter/data2.prom\" but should have \"my custom help text\"

Are you running node_exporter in Docker?

no

What did you do that produced an error?

Create 2 prom files in collector.textfile.directory containing metrics with the same name and different labels. One prom file contains a corresponding HELP entry, the other does NOT contain one.

What did you expect to see?

all metrics from both files + the one HELP entry in the output (maybe additionally with "Metric read from <files>")

What did you see instead?

only the metrics with the help entry the metrics from the file without the help entry were omitted in the output