Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels are overwritten even if honor_labels set to true #4782

Open
lgogolin opened this Issue Oct 24, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@lgogolin
Copy link

lgogolin commented Oct 24, 2018

Bug Report

What did you do?

Having 2 prometheus instances:

  1. instance in us-east-1 region with external_labels set:
        external_labels:
          project: monitoring
          region: "us-east-1"
  1. instance in eu-central-1 region with external_labels set:
        external_labels:
          project: monitoring
          region: "eu-central-1"

Instance no.2 has also configured federate job, that scrape us-east-1 region prometheus.


      - job_name: 'federate'
        scrape_interval: 15s

        honor_labels: true
        metrics_path: '/federate'

        params:
          'match[]':
            - '{__name__=~".+"}'

        static_configs:
          - targets:
            - 'prom-monitoring.us-east-1.domain.name'

What did you expect to see?

Metrics with both labels:

region="eu-central-1"

and

region="us-east-1"

What did you see instead? Under which circumstances?

All metrics have label

region="eu-central-1"

even those from us-east-1

  • Prometheus version:
prometheus, version 2.4.3 (branch: HEAD, revision: 167a4b4e73a8eca8df648d2d2043e21bdb9a7449)
  build user:       root@1e42b46043e9
  build date:       20181004-08:42:02
  go version:       go1.11.1
@roberth1988

This comment has been minimized.

Copy link

roberth1988 commented Oct 30, 2018

Hi guys am interested in the solution of this regex problem too. Anyone can help or provide a fix here?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Dec 7, 2018

All metrics have label

Where exactly are you seeing this? I'd expect to see us-east-1 and no value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.