Skip to content

Federation does not pass empty labels #3706

@pieterdejaeghere

Description

@pieterdejaeghere

On a local prometheus server, if a metric exists with an empty label it shows up like this:

metricxyz{empty_label="", other_label="xyz"}

if another prometheus server pulls in this metric via federation, the result becomes:

metricxyz{other_label="xyz"}

I'd expect the result to be identical, being:
metricxyz{empty_label="", other_label="xyz"}

Environment

  • System information:

Redhat7 Linux 3.10.0-514.10.2.el7.x86_64 x86_64

  • Prometheus version:

prometheus, version 2.0.0 (branch: HEAD, revision: 0a74f98)
build user: root@615b82cb36b6
build date: 20171108-07:11:59
go version: go1.9.2

  • Prometheus configuration file:

    • job_name: federation
      scheme: http
      metrics_path: /federate
      scrape_interval: 300s
      scrape_timeout: 120s
      honor_labels: true
      params:
      'match[]':
      - '{job="xyz"}'
      static_configs:
      • targets:
        • 'other-server:9090'

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