You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by ji...@apache.org on 2026/10/17 09:40:46 UTC
(hugegraph-doc) branch master updated: docs(pd): document per-store state and leader count gauges (#531)
This is an automated email from the ASF dual-hosted git repository.
imbajin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hugegraph-doc.git
The following commit(s) were added to refs/heads/master by this push:
new dd0693f58 docs(pd): document per-store state and leader count gauges (#531)
dd0693f58 is described below
commit dd0693f584c63e9c0ed9ae3d201f22467a9d6873
Author: Arshil <ar...@gmail.com>
AuthorDate: Sat Oct 17 15:10:42 2026 +0530
docs(pd): document per-store state and leader count gauges (#531)
PD exports hg_store_state{store,state} and hg_store_leader_count{store}
on /actuator/prometheus from apache/hugegraph#3357. List them on the PD
quickstart page, EN and CN, next to the other hg_* meters.
---
content/cn/docs/quickstart/hugegraph/hugegraph-pd.md | 2 ++
content/en/docs/quickstart/hugegraph/hugegraph-pd.md | 2 ++
2 files changed, 4 insertions(+)
diff --git a/content/cn/docs/quickstart/hugegraph/hugegraph-pd.md b/content/cn/docs/quickstart/hugegraph/hugegraph-pd.md
index 1a969d142..e124040eb 100644
--- a/content/cn/docs/quickstart/hugegraph/hugegraph-pd.md
+++ b/content/cn/docs/quickstart/hugegraph/hugegraph-pd.md
@@ -534,3 +534,5 @@ curl -u "store:${HG_PD_AUTH_SECRET_KEY:?请先设置 PD 部署密钥}" \
两个 `log` 接口接受形如 `{"startTime": "...", "endTime": "..."}` 的时间范围,`yyyy-MM-dd HH:mm:ss` 和 `yyyy-MM-dd` 都是可接受的格式。
PD 以 `hg` 前缀注册自己的指标,因此 `/actuator/prometheus` 除标准 JVM 指标外还会暴露 `hg_up`、`hg_graphs`、`hg_stores` 和 `hg_terms`,在存在图之后还会有按图统计的分区和大小指标。
+
+在 1.7.0 之后的版本中,PD 还会为每个已注册的 Store 导出 `hg_store_state{store="<id>",state="<state>"}`:Store 当前状态(`Unknown`、`Pending`、`Up`、`Offline`、`Exiting` 或 `Tombstone`)对应的序列为 `1`,其余为 `0`;以及 `hg_store_leader_count{store="<id>"}`,即 leader 位于该 Store 上的分片组数量。重建后的 Store 在 leader 迁回之前会报告 `0`。所有 PD 成员读取的是同一份复制的元数据,因此聚合这些序列前请先只选取一个实例。
diff --git a/content/en/docs/quickstart/hugegraph/hugegraph-pd.md b/content/en/docs/quickstart/hugegraph/hugegraph-pd.md
index 169292907..6f7998a63 100644
--- a/content/en/docs/quickstart/hugegraph/hugegraph-pd.md
+++ b/content/en/docs/quickstart/hugegraph/hugegraph-pd.md
@@ -539,3 +539,5 @@ All paths below are relative to `http://<pd-host>:8620` and need the Basic heade
The two `log` endpoints take a time range as `{"startTime": "...", "endTime": "..."}`; `yyyy-MM-dd HH:mm:ss` and `yyyy-MM-dd` are among the accepted formats.
PD registers its own meters under the `hg` prefix, so `/actuator/prometheus` exposes `hg_up`, `hg_graphs`, `hg_stores` and `hg_terms` alongside the standard JVM metrics, plus per-graph partition and size meters once graphs exist.
+
+In versions after 1.7.0, PD also exports, for each registered store, `hg_store_state{store="<id>",state="<state>"}`, which is `1` for the store's current state (`Unknown`, `Pending`, `Up`, `Offline`, `Exiting` or `Tombstone`) and `0` for the others, and `hg_store_leader_count{store="<id>"}`, the number of shard groups whose leader is on that store. A rebuilt Store reports `0` leaders until leadership moves back to it. Every PD member reads the same replicated metadata, so select one inst [...]