Skip to content

Prometheus output replaces "/" to "_" #2937

@Bregor

Description

@Bregor

Bug report

Starting from release 1.3.2 there is function sanitize in package prometheus_client which replaces anything but ^a-zA-Z0-9_ to _.
/ is not included in invalidNameCharRE, so all filesystem mounts looks like _var_lib_postgresql which is confusing.

Relevant telegraf.conf:

[inputs.diskio]
[[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs"]

[outputs.prometheus_client]
listen = ":9126"

System info:

$ telegraf --version
Telegraf v1.3.2 (git: release-1.3 0f419e9a0d294ab4d68bb7d1c6b28e60d362239b)
$ uname -r
4.8.0-54-generic

Steps to reproduce:

  1. Upgrade telegraf to 1.3.2
  2. Voila!

Expected behavior:

To return / as /

Actual behavior:

All slashes replaced with underscores
grafana - host stats 2017-06-18 11-55-26

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunexpected problem or unintended behaviorregressionsomething that used to work, but is now broken

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions