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

consul-sd started failing with 2.4.3 #4703

Closed
davidkarlsen opened this Issue Oct 6, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@davidkarlsen
Copy link

davidkarlsen commented Oct 6, 2018

Bug Report

What did you do?
Upgrade from v2.4.2 to v2.4.3

What did you expect to see?
That consul sd kept on working

What did you see instead? Under which circumstances?
The targets found through consul disappeared

Environment

  • System information:
    N/A

  • Prometheus version:
    v2.4.3

  • Prometheus configuration file:

 - job_name: 'consul'
    consul_sd_configs:
      - server: 'alp-aot-ccm02.unix.cosng.net:8500'
        datacenter: 'production'
    metric_relabel_configs:
      - source_labels: [container_label_container_group]
        target_label: container_group
    relabel_configs:
      - source_labels: [__meta_consul_tags]
        regex: .*prom_monitored.*
        action: keep
      - source_labels: [__meta_consul_service]
        target_label: job 
      - source_labels: [__meta_consul_tags]
        regex: .*,alias-([^,]+),.*
        replacement: '${1}'
        target_label: alias
      - source_labels: [__meta_consul_tags]
        regex: .*,metrics_path=([^,]+),.*
        replacement: '${1}'
        target_label: __metrics_path__
      - source_labels: [__meta_consul_tags]
        regex: .*,finodsgroup=([^,]+),.*
        replacement: '${1}'
        target_label: finodsgroup
      - source_labels: [__meta_consul_tags]
        regex: .*,container_group=([^,]+),.*
        replacement: '${1}'
        target_label: container_group
@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Oct 6, 2018

Can you confirm that it's still working with 2.4.2? These are all code changes from 2.4.2 -> 2.4.3:

v2.4.2...v2.4.3

It's really few changes and I have a hard time seeing how anything in there could have affected Consul SD...

@davidkarlsen

This comment has been minimized.

Copy link
Author

davidkarlsen commented Oct 6, 2018

Yes - works fine if I downgrade

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Oct 6, 2018

@davidkarlsen So strange - do you see any pre-relabeling targets being discovered under /service-discovery with 2.4.3?

@davidkarlsen

This comment has been minimized.

Copy link
Author

davidkarlsen commented Oct 6, 2018

Ah - I see what's going on now - it has trouble resolving the name of my consul server.
Did the base-image change in any way?

@davidkarlsen

This comment has been minimized.

Copy link
Author

davidkarlsen commented Oct 6, 2018

ah - now this is embarrassing - docker adds the hostname to /etc/hosts which messes things up - something has changed here - but it's a docker problem at my side. Sorry for the noise!

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Oct 6, 2018

@davidkarlsen No worries, glad that it's not a Prometheus problem :)

@simonpasquier

This comment has been minimized.

Copy link
Member

simonpasquier commented Oct 8, 2018

This has been introduced by prometheus/busybox#16

@lock lock bot locked and limited conversation to collaborators Apr 6, 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.