Skip to content

Metric names with dots #3700

Description

@faxm0dem

According to the exposition formats documentation a metric in the following style is valid :

# UTF-8 metric and label names:
{"my.dotted.metric", "error.message"="Not Found"}

However, when using this example with node_exporter and flag -collector.textfile.directory I get the following error message :

failed to collect textfile data" collector=textfile file=test.prom err="failed to parse textfile data from \"textfile_collector/test.prom\": text format parsing error in line 2: invalid metric name \"my.dottedmetric\"

Version information :

node_exporter, version 1.11.1 (branch: HEAD, revision: 0dd664dece3f8319f6bec5a221acd2c7ad13a23d)
  build user:       root@3d8697c83dd8
  build date:       20260407-15:45:19
  go version:       go1.26.1
  platform:         linux/amd64
  tags:             unknown

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions