refined grafana and prometheus
This commit is contained in:
@@ -1,14 +1,4 @@
|
||||
modules:
|
||||
http_2xx:
|
||||
prober: http
|
||||
timeout: 5s
|
||||
http:
|
||||
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
|
||||
valid_status_codes: [200]
|
||||
method: GET
|
||||
fail_if_ssl: false
|
||||
fail_if_not_ssl: false
|
||||
|
||||
tcp_connect:
|
||||
prober: tcp
|
||||
timeout: 5s
|
||||
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user