方法路径摘要认证
GET/v1/admin/system-db-pool读取应答主控进程的数据库连接池:当前值、最近 1 小时、常驻连接与告警状态登录会话

契约文件:api/control-system-db-pool.openapi.yaml

接口详情

GET /v1/admin/system-db-pool

读取应答主控进程的数据库连接池:当前值、最近 1 小时、常驻连接与告警状态

operationId
readControlDBPool
认证
  • 登录会话:主控登录后的 Bearer 会话,由客户本人在自己的主控里使用;插件不能要求客户交出会话。
所需权限

全部需要:control.upgrades.read

说明(契约原文)

Platform identity with control.upgrades.read or platform.admin (the maintenance page). The figures come from the memory of the control-api process that answers, sampled every 10 seconds: a cycle is bad when in use reaches max_conns - saturation_margin, the average acquire wait exceeds slow_acquire_ms, or an acquire gave up while the pool was full or queued (canceled_acquire, which alerts at once). enter_cycles consecutive bad cycles notify the platform members holding control.upgrades.read or platform.admin (control.db_pool.saturated, also in the administrator message center); recover_cycles consecutive clean cycles send control.db_pool.recovered. An alert entered within dedup_minutes of the last notified one is not sent (notified=false) unless it is still firing once that window has passed. Notifications are written on a connection outside the pool. Only the session check reads the database. Read-only, not audited.

响应

readControlDBPool 响应
状态码说明
200The pool monitor of the answering process.

字段:instance: string interval_seconds: integer thresholds: object current: DBPoolSample | null series: array<DBPoolSample> residents: array<Resident> firing: boolean firing_since: string(date-time) | null(date-time) firing_reasons: array<string: saturated / slow_acquire / canceled_acquire> notified: boolean last_notified_at: string(date-time) | null(date-time) pending_notifications: integer

401Authentication failed or the session is invalid.
403Not a platform identity with control.upgrades.read or platform.admin.
405Only GET is supported.

失败时怎么办

  • 401 检查凭据格式、是否过期或被轮换。
  • 403 检查 Key 范围与所有者当前权限、当前租户作用域;不要换更高权限账号绕过。

↑ 回到列表