Files
gochat/deploy/prometheus/prometheus.yml
T
Rogeeandrogee fb83285617 HH-445: deploy production observability and runbooks (#96)
* HH-445: deploy production observability and runbooks

* fix(ops): share production database DSN

* fix(HH-445): enforce database TLS gate

* fix(HH-445): preserve production serve command

* fix(prod): require external database dependencies

* fix(prod): unify database host rejection gates

* test(prod): enforce exact database TLS runbook contract

---------

Co-authored-by: Rogee <rogee@ipao.vip>
2026-08-22 19:39:57 +08:00

80 lines
1.9 KiB
YAML

global:
scrape_interval: 15s
evaluation_interval: 15s
rule_files:
- /etc/prometheus/rules/*.yml
alerting:
alertmanagers:
- static_configs:
- targets: [alertmanager:9093]
scrape_configs:
- job_name: prometheus
static_configs:
- targets: [prometheus:9090]
- job_name: alertmanager
static_configs:
- targets: [alertmanager:9093]
- job_name: gochat
metrics_path: /metrics
static_configs:
- targets: [gochat:3000]
- job_name: postgres-exporter
static_configs:
- targets: [postgres-exporter:9187]
- job_name: redis-exporter
static_configs:
- targets: [redis-exporter:9121]
- job_name: cadvisor
static_configs:
- targets: [cadvisor:8080]
- job_name: node-exporter
static_configs:
- targets: [node-exporter:9100]
- job_name: gochat-readiness
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets: ["http://gochat:3000/ready"]
relabel_configs: &blackbox-relabel
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
- job_name: gochat-database-readiness
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets: ["http://gochat:3000/health?check=database"]
relabel_configs: *blackbox-relabel
- job_name: gochat-redis-readiness
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets: ["http://gochat:3000/health?check=redis"]
relabel_configs: *blackbox-relabel
- job_name: shangwutong-readiness
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets: ["http://shangwutong:9100/readyz"]
relabel_configs: *blackbox-relabel