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

Feature Request: Support Different Proxies for Individual Targets #1310

Open
nirmal20081028 opened this issue Oct 21, 2024 · 2 comments
Open

Comments

@nirmal20081028
Copy link

We have a requirement to use different proxy URLs for different targets. Since each target has its own proxy URL, creating multiple scrape jobs based on different proxy URLs is not feasible. We aim to create a single job where both the target and the proxy URL can be passed dynamically.

@mazzz1y
Copy link

mazzz1y commented Oct 29, 2024

This is not directly related to blackbox, and it can be resolved by using Prometheus relabeling.

Example:

  - job_name: "blackbox"
    metrics_path: /probe
    labels:
    static_configs:
      - targets: [connectivitycheck.gstatic.com/generate_204]
        labels:
          module: http
      - targets: [connectivitycheck.gstatic.com/generate_204]
        labels:
          module: http_with_proxy
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [module]
        target_label: __param_module
      - source_labels: [__param_target]
        target_label: url
      - target_label: __address__
        replacement: blackbox-exporter:9115

@nirmal20081028
Copy link
Author

@mazzz1y ,When managing just a few proxies, it's straightforward. However, with 5,000 targets spread across 5,000 different proxies, how can we effectively handle this using the Blackbox Exporter?

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