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

HTTP targets for blackbox-exporter became invalid since 0.18.0rc1 #1536

Closed
Bregor opened this Issue Apr 7, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@Bregor
Copy link

Bregor commented Apr 7, 2016

Hello!

Sorry in advance if this really isn't an issue.

After update to 0.18.0rc1 previously valid targets for blackbox-exporter became invalid.

Related config fragment:

metrics_path: /probe
params:
  module: [http_2xx]

target_groups:
  - targets:
    - https://somewebsite.ru/health
    - https://api.somewebsite.ru/global/health
    - https://m.somewebsite.ru/health

After update there are log records like:

ERRO[0002] Target update failed: "https://somewebsite.ru/health" is not a valid hostname  source=targetmanager.go:293 target_group=0
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Apr 7, 2016

That is an invalid configuration, try it with the relabel_config.

@Bregor

This comment has been minimized.

Copy link
Author

Bregor commented Apr 7, 2016

relabel_configs section:

relabel_configs:
  - source_labels: [__address__]
    regex: (.*)(:80)?
    target_label: __param_target
    replacement: ${1}
  - source_labels: [__param_target]
    regex: ^https?://([^/]+).*$
    target_label: instance
    replacement: ${1}
  - source_labels: [__meta_consul_node]
    regex: (.+)
    target_label: __address__
    replacement: ${1}

Is it wrong?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Apr 7, 2016

Yes, you're not overriding the __address__ label. Look at the example on https://github.com/prometheus/blackbox_exporter#prometheus-configuration

@Bregor

This comment has been minimized.

Copy link
Author

Bregor commented Apr 7, 2016

__address__ label always should be equal to address of blackbox-exporter?

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Apr 7, 2016

Yes, __address__ is what Prometheus actually talks to.

@Bregor

This comment has been minimized.

Copy link
Author

Bregor commented Apr 7, 2016

Thank you so much!
Works like a charm.

@Bregor Bregor closed this Apr 7, 2016

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 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 24, 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.