- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_2xx] # Look for a HTTP 200 response.
static_configs:
- targets:
- https://example.com
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115 # The blackbox exporter's real hostname:port.
Hello,I'm having trouble understanding how to configure tcp probes to service ports other than http servers.Can someone give me an example how to probe a ssh-port?
I already successfully configured prom to probe http servers via blackbox-exporter:
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_2xx] # Look for a HTTP 200 response.
static_configs:
- targets:
- https://example.com
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115 # The blackbox exporter's real hostname:port.There is no example in the blackbox-exporter project how to configure other modules other than http_2xx. Also, although I understand golang quite well, I don't understand where that _2xx suffix comes from.
- job_name: blackbox-endpoints params: module: - http_2xx scrape_interval: 1m scrape_timeout: 10s metrics_path: /probe scheme: http file_sd_configs: - files: - /etc/blackbox-endpoints/*.yml refresh_interval: 1m
relabel_configs: - source_labels: [__address__] target_label: __param_target - source_labels: [__param_target] target_label: instance - target_label: __address__
replacement: blackbox.kube-system:9115
--
You received this message because you are subscribed to a topic in the Google Groups "Prometheus Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/prometheus-users/Je5BfIHc1ZI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/cb6af363-1ad5-4256-8a7e-e15b01c5f051%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.