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

When a promscrape config contains a target that contains the scheme, vmagent will drop the target without an error message #3208

Closed
denisgolius opened this issue Oct 7, 2022 · 2 comments
Labels
enhancement New feature or request vmagent

Comments

@denisgolius
Copy link
Contributor

Describe the bug
when a promscrape config contains a target that contains the scheme (http/https), vmagent will drop the target without an error message

To Reproduce
add a http/https scheme to scrape target, see an examples below:

prometheus.yml:

global:
  scrape_interval: 10s

scrape_configs:
  - job_name: 'vmagent'
    static_configs:
      - targets: ['http://vmagent:8429']
  - job_name: 'vmalert'
    static_configs:
      - targets: ['vmalert:8880']
  - job_name: 'victoriametrics'
    static_configs:
      - targets: ['victoriametrics:8428']

Expected behavior
vmagent will not start or print out an error to logs/stdout as it works in prometheus

Screenshots
image

@denisgolius denisgolius added the bug Something isn't working label Oct 7, 2022
@valyala valyala added the vmagent label Oct 7, 2022
@valyala
Copy link
Collaborator

valyala commented Oct 7, 2022

This is a kind of a feature-bug :) Prometheus doesn't allow specifying scheme and metrics path in targets list and in the __address__ label - see the __address__ contains "/" block at the first diagram in this article.

I think this is more a bug than a feature, since it feels natural specifying full scrape urls in targets list or in __address__ label during relabeling. So this "bug" has been fixed in the commit f9df0ca . This commit will be included in the next release. In the meantime it is possible to build vmagent from this commit according to these instructions and verify whether it accepts full urls in targets list as expected.

@valyala valyala added enhancement New feature or request and removed bug Something isn't working labels Oct 7, 2022
valyala added a commit that referenced this issue Oct 7, 2022
…hich allows specifying full scrape urls in `targets` list and in the `__address__` label

Updates #3208
valyala added a commit that referenced this issue Oct 7, 2022
…hich allows specifying full scrape urls in `targets` list and in the `__address__` label

Updates #3208
@valyala
Copy link
Collaborator

valyala commented Oct 29, 2022

vmagent accepts full urls at __address__ label and at targets list of static_configs starting from v1.83.0. Closing this issue as fixed.

@valyala valyala closed this as completed Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vmagent
Projects
None yet
Development

No branches or pull requests

2 participants