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

Scraping multiple exporters via pushprox #160

Open
anthonyra opened this issue Nov 14, 2023 · 1 comment
Open

Scraping multiple exporters via pushprox #160

anthonyra opened this issue Nov 14, 2023 · 1 comment

Comments

@anthonyra
Copy link

I've looked around to see if there was documentation on this but couldn't find anything concrete with regards to pushprox. One of the suggested approaches would be to use relabel_config which drops everything that doesn't match source_labels... however I'm not sure if the labels is being returned when using the http_sd_configs approach.

Each metric collector will most likely need to be a separate job (to ensure that all targets have the specific metrics for collection) but would it make sense to use relabel_config or maybe implement a filter query parameter on the http://localhost:8080/clients endpoint.

@peekjef72
Copy link

Maybe it is too late for you, but...

The only thing you have to do is to specify the host:port of the exporter to scrap it:

  • so client:9100 for node_exporter,
  • client:9182 for window_exporter
  • and so on...

relabeling is only required if you have "pollers" like for blackbox that act as central point for scraping.

scrape_configs:
- job_name: node
  proxy_url: http://proxy:8080/
  static_configs:
    - targets: ['client:9100']  # Presuming the FQDN of the client is "client" and exporter is listening on port 9101.
    - targets: ['win_client:9182'].
- job_name: job2
  proxy_url: http://proxy:8080/
  static_configs:
    - targets: ['client:port']  # Presuming the FQDN of the client is "client".

this acts like in cmd shell:

curl -v --proxy http://proxy:8080 \
    -H "X-Prometheus-Scrape-Timeout-Seconds: 5" \
    http://client:9100/metrics

curl -v --proxy http://proxy:8080 \
    -H "X-Prometheus-Scrape-Timeout-Seconds: 5" \
    http://win_client:9182/metrics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants