Last active
August 26, 2020 11:06
-
-
Save buuhsmead/430f0f16386a44501cfe81241f65e838 to your computer and use it in GitHub Desktop.
prometheus job with blackbox-exporter to scrape
This file contains hidden or 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
- job_name: 'blackbox-scrape' | |
metrics_path: /probe # is the endpoint of blackbox-exporter itself | |
params: | |
module: ['tcp_connect'] # a module defined in blackbox-config.yaml inside blackbox image | |
kubernetes_sd_configs: | |
- role: endpoints | |
namespaces: | |
names: | |
- '${NAMESPACE}' | |
relabel_configs: # not correct at this moment WIP | |
- source_labels: [__address__] | |
target_label: __param_target | |
- source_labels: [__param_target] | |
target_label: instance | |
- target_label: __address__ | |
replacement: blackbox-exporter:9115 # Blackbox exporter service. | |
# Get specific info, like version info of blackbox exporter. Also if blackbox is up or down. | |
- job_name: blackbox-metrics | |
metrics_path: /metrics | |
static_configs: | |
- targets: | |
- localhost:9115 | |
And get a blackbox-exporter image running and accessable at 'localhost:9115'. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
module: refers to a defined config item inside the blackbox-config.yaml