ops(go): schedule capacity health checks
This commit is contained in:
@@ -37,6 +37,17 @@ curl -fsS http://127.0.0.1:20200/readyz
|
||||
|
||||
它会抓取 Gateway、History writer、Stat writer、NATS bridge、Realtime API、NATS fast writer 的本地 `/metrics`,输出 JSON。退出码 `0` 表示当前关键 backlog 和拒绝计数正常,退出码 `2` 表示存在 pending、Kafka lag、连接拒绝或 metrics 抓取失败,适合接入 cron/告警。
|
||||
|
||||
ECS 上通过 systemd timer 每分钟执行一次:
|
||||
|
||||
```bash
|
||||
systemctl status lingniu-go-capacity-check.timer
|
||||
systemctl list-timers lingniu-go-capacity-check.timer
|
||||
journalctl -u lingniu-go-capacity-check.service --since '10 minutes ago' --no-pager
|
||||
systemctl start lingniu-go-capacity-check.service
|
||||
```
|
||||
|
||||
`lingniu-go-capacity-check.service` 是 oneshot 服务。容量健康时退出码为 `0`;不健康时退出码为 `2`,timer 会保留 failed 结果,JSON findings 会写入 journal。
|
||||
|
||||
## Core Counters
|
||||
|
||||
| Metric | Meaning |
|
||||
|
||||
Reference in New Issue
Block a user