Created
June 18, 2020 15:22
-
-
Save mlushpenko/6b56d6bfe178d6fb513c9724296d06f1 to your computer and use it in GitHub Desktop.
blackbox-ingress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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