---
title: OCP 告警中心关于 OBLB etcd 集群无主的误告警-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于OCP 告警中心关于 OBLB etcd 集群无主的误告警相关的常见问题和使用技巧，帮助您快速解决OCP 告警中心关于 OBLB etcd 集群无主的误告警的难题。
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会")

## 体验新一代 AI 数据平台

[立即咨询](https://www.oceanbase.com/contactus) [免费试用 免费试用](https://www.oceanbase.com/free-trial)划线反馈

# OCP 告警中心关于 OBLB etcd 集群无主的误告警

更新时间：2026-07-08 08:01

适用版本： V2.x、V3.x、V4.x 内容类型：TechNote  

## 详细说明

OCP V4.2.1 版本在 **监控告警** 模块增加了 OBLB & OBDNS 的告警能力，共涉及 16 个告警指标，如进程状态、进程连通性等，从而实现 OceanBase 整个架构体系的告警能力。在日常测试及运维时，若遇到 OBLB etcd 集群无主的相关告警，可以根据相关命令自行排查。

- **排查命令一：**

  ```shell
  [root@oblb-server ~]# curl -s --unix-socket /home/admin/ocp_agent/run/ocp_monagent.$(cat /home/admin/ocp_agent/run/ocp_monagent.pid).sock http://unix-socket-server/metrics/node/oblb | grep etcd_server_is_leader
  # HELP etcd_server_is_leader monitor collected message
  # TYPE etcd_server_is_leader gauge
  etcd_server_is_leader{app="OBLB",ob_cluster_id="0",ob_cluster_name="",process="etcd",service="oblb_service",svr_ip="xx.xx.xx.xx"} 1 1716988981241

  ```
 - **排查命令二：**

  ```shell
  [root@oblb-server ~]# curl http://xx.xx.xx.xx:2379/metrics | grep etcd_server_is_leader
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0# HELP etcd_server_is_leader Whether or not this member is a leader. 1 if is, 0 otherwise.
  # TYPE etcd_server_is_leader gauge
  etcd_server_is_leader 1

  ```

  `etcd_server_is_leader 1` 说明该 etcd 为 leader 主节点。
 - **排查命令三：**

  ```sql
  [root@oblb-server ~]# ETCDCTL_API=3 etcdctl --write-out=table --endpoints=http://xxx.xxx.xxx.xx:2379 --user root:'xxxx' endpoint status
  +---------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+
  |         ENDPOINT          |        ID        | VERSION | DB SIZE | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
  +---------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+

  | http://xxx.xx.xx.xx:2379 | f7e6fe72cb340bac |   3.5.1 |  328 kB |      true |      false |         4 |        332 |                332 |        |
  +---------------------------+------------------+---------+---------+-----------+------------+-----------+------------+--------------------+--------+

  ```

  `IS LEADER` 字段为 `true` 表明该 etcd 为 leader 主节点。

从上面的排查结果来看，可以发现当前 OBLB etcd 存在 leader 主节点，故该告警属于误报。

**备注：已知在 OCP V4.2.2 BP1 上存在 OBLB etcd 集群无主的误告警，该问题修复在OCP V4.3.0及后续版本，升级到相关修复版本即可**。

## 影响租户

影响 OceanBase 数据库中的 SYS 租户和 Oracle 租户以及 MySQL 租户。

## 适用版本

OCP V4.2.1 及之后版本、V4.3.0 之前版本。

上一篇

[如何在 OCP 上精确屏蔽一条告警](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000925607)

下一篇

[如何处理 OCP 告警未聚合](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002468305) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ) 咨询
