mirror of
https://gitverse.ru/kpa39l/monitoring.git
synced 2026-09-29 18:05:08 +00:00
62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
external_labels:
|
|
monitor: 'garage-cluster'
|
|
|
|
rule_files:
|
|
- /etc/prometheus/alerts.yml
|
|
|
|
scrape_configs:
|
|
# Garage node metrics (admin API on WG) — Bearer auth
|
|
- job_name: 'garage'
|
|
metrics_path: /metrics
|
|
scheme: http
|
|
authorization:
|
|
type: Bearer
|
|
credentials: c213debe864061cefe501f7791d557b6dba701710b41791b4a4a0fb036690d1d
|
|
static_configs:
|
|
- targets: ['10.8.0.1:3903', '10.8.0.2:3903', '10.8.0.4:3903']
|
|
labels:
|
|
cluster: garage
|
|
|
|
# HTTP health probe via blackbox-exporter (returns probe_success)
|
|
- job_name: 'garage_health'
|
|
metrics_path: /probe
|
|
params:
|
|
module: [http_2xx]
|
|
static_configs:
|
|
- targets: ['http://10.8.0.1:3903/health']
|
|
labels:
|
|
instance: vps01
|
|
- targets: ['http://10.8.0.2:3903/health']
|
|
labels:
|
|
instance: bigbox
|
|
- targets: ['http://10.8.0.4:3903/health']
|
|
labels:
|
|
instance: vps02
|
|
relabel_configs:
|
|
- source_labels: [__address__]
|
|
target_label: __param_target
|
|
- source_labels: [__param_target]
|
|
target_label: target
|
|
- target_label: __address__
|
|
replacement: 127.0.0.1:9115
|
|
|
|
# Node exporter on each host (system metrics via WG)
|
|
- job_name: 'node'
|
|
static_configs:
|
|
- targets: ['10.8.0.2:9100']
|
|
labels:
|
|
host: bigbox
|
|
- targets: ['10.8.0.1:9100']
|
|
labels:
|
|
host: vps01
|
|
- targets: ['10.8.0.4:9100']
|
|
labels:
|
|
host: vps02
|
|
|
|
# Prometheus self
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090'] |