Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
blackbox-ingress
## Monitor Kubernetes ingress endpoints
- job_name: blackbox
metrics_path: /probe
params:
module: [http_2xx]
kubernetes_sd_configs:
- role: ingress
relabel_configs:
# 1. Set ingress address protocol to https, so we can make sure certificates are valid while probing endpoints
- source_labels: [__address__]
regex: (.*)
action: replace
replacement: https://$1
target_label: __param_target
# 2. Save address in an instance label since __param_target is going to be dropped
- source_labels: [__param_target]
target_label: instance
# 3. Replace address with an internal blackbox service so scraper is always pointed at blackbox-exporter
- target_label: __address__
replacement: blackbox-exporter:9115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.