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

Relabel consul node to instance not working #2539

Closed
perbly opened this Issue Mar 28, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@perbly
Copy link

perbly commented Mar 28, 2017

As you see in the picture, instance-label isn't the __meta_consul_node. But when i do a mouseover the nodename is correct.
And it seems like reconfiguring/restarting prometheus gives the correct nodename for a while and then it just disappear and becomes the address:post again.

I tried to relabel __meta_consul_node to a new label called "hostname" and that worked perfect for a while also until it just disappeared.

What did you do?
Configured prometheus to scrape consul and relabel _consul_node to instance
What did you expect to see?
the nodename (hostname)
What did you see instead? Under which circumstances?
address+port
Environment
Consul 0.7.3

  • System information:
    Ubuntu 16.10

  • Prometheus version:
    1.5.0

  • Alertmanager version:

    insert output of alertmanager -version here (if relevant to the issue)

  • Prometheus configuration file:

  - job_name: consul
    consul_sd_configs:
    - server:   'consul.gotham.city:8500'

    relabel_configs:
    - source_labels: ['__meta_consul_service']
      regex:         '(.*)'
      target_label:  'job'
      replacement:   '$1'
    - source_labels: ['__meta_consul_tags']
      regex:         ',(prod|uat),'
      target_label:  'group'
      replacement:   '$1'
    - source_labels: ['__meta_consul_node']
      regex:         '(.*)'
      target_label:  'instance'
      replacement:   '$1'
    - source_labels: ['__meta_consul_dc']
      regex:         '(.*)'
      target_label:  'datacenter'
      replacement:   '$1'
insert configuration here
  • Alertmanager configuration file:
insert configuration here (if relevant to the issue)
  • Logs:
nothing in logs regarding this

image

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 29, 2017

This is a known bug in 1.5.0, please upgrade to 1.5.2.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

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