refined grafana and prometheus

This commit is contained in:
2026-02-21 19:04:31 +01:00
parent d276792607
commit 6f70c5f66b
6 changed files with 239 additions and 370 deletions

View File

@@ -3,25 +3,6 @@ global:
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:
@@ -30,6 +11,7 @@ scrape_configs:
- targets:
- db:5432
- redis:6379
- tutortool:5000
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
@@ -37,13 +19,3 @@ scrape_configs:
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']