Blackbox exporter
|
|
The blackbox exporter is used for probing other servers and Services from the satellite node’s perspective via HTTP, HTTPS, DNS, SSH, POP, TCP, ICMP etc. This can be used, for example, to check whether an application server has a stable connection to the database or DNS server. this can be used, for example, to check whether an application server has a stable connection to the database or DNS server.
Configuration
The configuration for the blackbox exporter can be found in the file vimon/config/blackbox_exporter/blackbox_exporter.yml.
This is where you configure how the probes are to be executed (packet sizes, fragmentation, TLS, fallback, etc.).). Details can be found in the supplied sample file and can be viewed under Prometheus Blackbox Exporter.
Static-Target
Targets for testing can also be stored in the configuration, e.g.:
http_static_url_example:
prober: http
timeout: 5s
http:
method: POST
headers:
Host: "inubit-host.foo.com"
basic_auth:
username: "virtimo"
password: "secret"
Dynamic Target
Targets for testing can also be controlled from Prometheus via the Scrape configuration, in which case the transfer must be made by reassigning the Labels:
http_dynamic_url_example:
prober: http
timeout: 5s
http:
method: POST
headers:
Content-Type: application/json
body: '{}'
scrape_configs:
- job_name: 'vimon-black'
metrics_path: /probe
params:
module: [http_dynamic_url_example] # The HTTP prober alias
static_configs:
- targets:
- http://www.virtimo.de # Target to probe with http.
- https://www.virtimo.cloud # Target to probe with https.
- http://bpc-host.virtimo.foo:8181 # Target to probe with http on port 8181.
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 10.5.23.42:9115 # The blackbox exporter's real hostname:port.
Further examples and details can be found in the official documentation under https://github.com/prometheus/blackbox_exporter.