50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
global:
|
|
scrape_interval: 30s
|
|
evaluation_interval: 30s
|
|
|
|
scrape_configs:
|
|
|
|
# --- Health checks via Blackbox Exporter ---
|
|
- job_name: 'blackbox_http'
|
|
metrics_path: /probe
|
|
params:
|
|
module: [http_2xx]
|
|
static_configs:
|
|
- targets:
|
|
- http://tutortool:5000/grafana/health
|
|
- http://tutortool:5000/
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: instance
|
|
- target_label: __address__
|
|
replacement: blackbox-exporter:9115
|
|
|
|
# --- TCP check for Postgres ---
|
|
- job_name: 'blackbox_tcp'
|
|
metrics_path: /probe
|
|
params:
|
|
module: [tcp_connect]
|
|
static_configs:
|
|
- targets:
|
|
- db:5432
|
|
- redis:6379
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: instance
|
|
- target_label: __address__
|
|
replacement: blackbox-exporter:9115
|
|
|
|
# --- Blackbox exporter itself ---
|
|
- job_name: 'blackbox_exporter'
|
|
static_configs:
|
|
- targets: ['blackbox-exporter:9115']
|
|
|
|
# --- Prometheus itself ---
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090']
|