Skip to content

Instantly share code, notes, and snippets.

@sethryder
Last active April 17, 2023 06:49
Show Gist options
  • Save sethryder/b6f50b0e9bd1f3f0fc4e3d002c7f48df to your computer and use it in GitHub Desktop.
Save sethryder/b6f50b0e9bd1f3f0fc4e3d002c7f48df to your computer and use it in GitHub Desktop.
monitor multiple blackbox modules with a single job
modules:
https_2xx:
prober: http
timeout: 5s
http:
method: GET
no_follow_redirects: false
fail_if_ssl: false
fail_if_not_ssl: true
preferred_ip_protocol: "ipv4"
http_2xx:
prober: http
timeout: 5s
http:
method: GET
no_follow_redirects: false
fail_if_ssl: true
fail_if_not_ssl: false
preferred_ip_protocol: "ipv4"
- labels:
module: http_2xx
targets:
- http://www.stealmylogin.com/
- labels:
module: https_2xx
targets:
- https://www.sethryder.com
- https://www.modpackindex.com
# Blackbox Exporter
- job_name: 'blackbox'
scrape_interval: 10s
metrics_path: /probe
file_sd_configs:
- files:
- '/etc/prometheus/blackbox/targets/*.yml'
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [module]
target_label: __param_module
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9115 # blackbox exporter
# End Blackbox Exporter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment