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

pass server_name as query parameter #624

Closed
sepich opened this issue May 16, 2020 · 4 comments
Closed

pass server_name as query parameter #624

sepich opened this issue May 16, 2020 · 4 comments

Comments

@sepich
Copy link

sepich commented May 16, 2020

blackbox_exporter version: output of blackbox_exporter -version

0.16.0

We have to monitor many certificates installed on groups of hosts and being managed separately.
For example multiple backends behind single Load Balancer, answering by the same name.
Another use-case is monitoring HTTPS port on nodes behind Load Balancer, where certificate does not have specific node names, but only main VIP name.

Right now we have to manage both blackbox-exporter and prometheus configs like this:

What is the blackbox.yml module config.

# many sections like
  elk:
    prober: tcp
    timeout: 5s
    tcp:
      preferred_ip_protocol: ipv4
      tls: true
      tls_config:
        server_name: es.domain.local
# basically only differ in server_name

What is the prometheus.yml scrape config.

- job_name: blackbox
  metrics_path: /probe
  static_configs:
# many groups like this
    - labels:
        service: elk
        __params_module: [elk]
      targets: # es.domain.local
        - es-logs-node1.domain.local:443
        - es-logs-node2.domain.local:443
        - es-logs-node3.domain.local:443
        - es-logs-node1.domain.local:9300
        - es-logs-node2.domain.local:9300
        - es-logs-node3.domain.local:9300
        - es-logs-warm-node1.domain.local:9300
# only differ in hosts and module name
  relabel_configs:
  ...

What did you expect to see?

Having ability to pass server_name via query parameter (like module) would greatly simplify things. So, we could manage config only on prometheus side.

@brian-brazil
Copy link
Contributor

This has been requested in many forms, but this is not something that is going to be added. Each configuration option only comes from one place, and as your example shows you can already do this via modules. This is a matter for your configuration management.

@AndresPineros
Copy link

AndresPineros commented Apr 7, 2022

Just because a problem can be solved, doesn't mean that design can't be improved. Imagine if I said "ServiceMonitors aren't needed because the person can just manually pass configurations to a prometheus.yaml file".... Well, yeha, but why centralize instead of making it dynamic?

What's the point of Ingress resources? What's the point of Prometheus resource for the PrometheusOperator? The problem they solve could be solved with configuration management.

Nobody wants to create a new module for every new domain that has to be monitored.

@roidelapluie
Copy link
Member

Hello, hostname can now be passed as query parameter, as of last release, which I expect should fix this.

@Nothing4You
Copy link

I don't believe this is fully fixed yet.
I believe you're referring to #823 but that only solves this for HTTP probes.

For TCP probes this is still not supported.

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

Successfully merging a pull request may close this issue.

5 participants