Service Status 2,9182,918
3/27/2020
3/27/2020
2
Web Servers
>=6.5.1
Prometheus
Summary
Monitoring service status by check service tcp port via prometheus blackbox exporter
Dependencies
Configure
Ensure that the tcp_connect module of blackbox_exporter is enabled.
blackbox.yml
modules:
http_2xx:
prober: http
# http_post_2xx:
# prober: http
# http:
# method: POST
tcp_connect:
prober: tcp
Prometheus.yml
scrape_configs:
- job_name: "blackbox-83"
metrics_path: /probe
params:
module: [tcp_connect]
file_sd_configs:
- files:
- "/opt/prometheus/file_sd/services.yml"
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: 172.20.3.223:9115
services.yml
- targets:
- 172.20.3.83:9600
- 172.20.3.84:9600
- 172.20.3.85:9600
labels:
group: catcher
- targets:
- 172.20.3.83:13660
labels:
group: datahub
Export Dashboard✕
Download
Copy to Clipboard