Blackbox exporter

From UVOO Tech Wiki
Revision as of 18:37, 22 February 2024 by Busk (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Example

https://github.com/prometheus/blackbox_exporter/blob/master/example.yml

Multiple

scrape_configs:
 - job_name: probe
   params:
     module:
      - http_2xx
     target: 
      - http://xyz/api/serverping
   metrics_path: /probe
   scheme: http
   static_configs:
    - targets:
       - bbexporter1:9115
       - bbexporter2:9115
       - bbexporter3:9115
       - bbexporter4:9115
       - bbexporter5:9115
curl "http://192.x.x.x:9115/probe?target=https://google.com&module=http_2xx"

Multiple URLs

scrape_configs:
  - job_name: 'blackbox'
    metrics_path: /probe
    params:
      module: [http_2xx]  # Look for a HTTP 200 response.
    static_configs:
      - targets:
        - http://prometheus.io    # Probe with http.
        - https://prometheus.io   # Probe with https.
        - http://example.com:8080 # Probe with http on port 8080.
    relabel_configs:
      - source_labels: [__address__]
        target_label: __param_target
      - source_labels: [__param_target]
        target_label: instance
      - target_label: __address__
        replacement: 127.0.0.1:9115  # Blackbox exporter's address.

Best

https://blog.devops.dev/prometheus-blackbox-exporter-with-kube-prometheus-stack-23a045ccbab2

https://www.opsramp.com/guides/prometheus-monitoring/prometheus-blackbox-exporter/

And more

curl http://blackbox-exporter-prometheus-blackbox-exporter.prometheus:9115/probe?target=example.com:443&module=tcp_connect&debug=true

https://blog.ruanbekker.com/cheatsheets/blackbox-exporter/

https://superuser.com/questions/1680156/prometheus-blackbox-exporter-tcp-probe-returns-value-of-0-even-when-port-is-ope

https://dmachard.github.io/posts/0043-blackbox-prometheus-dns/

https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md

Multiple Exporters from Single Job

More

https://stackoverflow.com/questions/58832749/prometheus-blackbox-exporter-citing-several-modules-per-job

https://medium.com/@akshyanshal/blackbox-exporter-to-monitor-websites-with-prometheus-and-visualize-on-grafana-e81d8a679de2

https://www.opsramp.com/guides/prometheus-monitoring/prometheus-blackbox-exporter/

https://stackoverflow.com/questions/74759672/promethues-check-external-api-json-response

https://www.squadcast.com/blog/prometheus-blackbox-exporter