From fc0eed28eae0e2493153273ec62584f09bb8a231 Mon Sep 17 00:00:00 2001 From: WenyXu Date: Thu, 26 Jun 2025 14:44:38 +0800 Subject: [PATCH] docs: update maintenance mode API endpoints --- .../maintenance-mode.md | 12 +++++++----- .../maintenance-mode.md | 18 ++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/user-guide/deployments-administration/maintenance-mode.md b/docs/user-guide/deployments-administration/maintenance-mode.md index 0c415dbb8..4c961ceb0 100644 --- a/docs/user-guide/deployments-administration/maintenance-mode.md +++ b/docs/user-guide/deployments-administration/maintenance-mode.md @@ -36,14 +36,14 @@ When maintenance mode is enabled: - Monitoring and metrics collection continue to function ## Managing Maintenance Mode -The maintenance mode can be enabled and disabled through Metasrv's HTTP interface at: `http://{METASRV}:{RPC_PORT}/admin/maintenance?enable=true`. Note that this interface listens on Metasrv's `RPC_PORT`, which defaults to `3002`. +The maintenance mode can be enabled and disabled through Metasrv's HTTP interface at: `http://{METASRV}:{RPC_PORT}/admin/maintenance/enable` and `http://{METASRV}:{RPC_PORT}/admin/maintenance/disable`. Note that this interface listens on Metasrv's `RPC_PORT`, which defaults to `3002`. ### Enable Maintenance Mode -Enable maintenance mode by sending a POST request to the `/admin/maintenance` endpoint. +Enable maintenance mode by sending a POST request to the `/admin/maintenance/enable` endpoint. ```bash -curl -X POST 'http://localhost:3002/admin/maintenance?enable=true' +curl -X POST 'http://localhost:3002/admin/maintenance/enable' ``` The expected output is: @@ -55,12 +55,14 @@ If you encounter any issues or unexpected behavior, do not proceed with maintena ### Disable Maintenance Mode +Disable maintenance mode by sending a POST request to the `/admin/maintenance/disable` endpoint. + Before disabling maintenance mode: 1. Ensure all components are healthy and operational 2. Verify that all nodes are properly joined to the cluster ```bash -curl -X POST 'http://localhost:3002/admin/maintenance?enable=false' +curl -X POST 'http://localhost:3002/admin/maintenance/disable' ``` The expected output is: @@ -73,7 +75,7 @@ The expected output is: Check maintenance mode status by sending a GET request to the `/admin/maintenance` endpoint. ```bash -curl -X GET http://localhost:3002/admin/maintenance +curl -X GET http://localhost:3002/admin/maintenance/status ``` The expected output is: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/maintenance-mode.md b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/maintenance-mode.md index e24a2dee5..c7233628c 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/maintenance-mode.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/user-guide/deployments-administration/maintenance-mode.md @@ -36,14 +36,14 @@ description: 介绍如何管理 GreptimeDB 集群维护模式,以便在防止 - 监控和指标收集继续运行 ## 管理维护模式 -维护模式可以通过 Metasrv 的 HTTP 接口启用和禁用:`http://{METASRV}:{RPC_PORT}/admin/maintenance?enable=true`。请注意,此接口监听 Metasrv 的 `RPC_PORT`,默认为 `3002`。 +维护模式可以通过 Metasrv 的 HTTP 接口启用和禁用:`http://{METASRV}:{RPC_PORT}/admin/maintenance/enable` 和 `http://{METASRV}:{RPC_PORT}/admin/maintenance/disable`。请注意,此接口监听 Metasrv 的 `RPC_PORT`,默认为 `3002`。 ### 启用维护模式 -通过发送 POST 请求到 `/admin/maintenance` 端点启用维护模式。 +通过发送 POST 请求到 `/admin/maintenance/enable` 端点启用维护模式。 ```bash -curl -X POST 'http://localhost:3002/admin/maintenance?enable=true' +curl -X POST 'http://localhost:3002/admin/maintenance/enable' ``` 预期输出: @@ -53,14 +53,16 @@ curl -X POST 'http://localhost:3002/admin/maintenance?enable=true' 如果遇到任何问题或意外行为,请不要继续进行维护操作。 -### 禁用维护模式 +### 停用维护模式 -在禁用维护模式之前: +通过发送 POST 请求到 `/admin/maintenance/disable` 端点停用维护模式。 + +在停用维护模式之前: 1. 确保所有组件健康且正常运行 2. 验证所有节点是否正确加入集群 ```bash -curl -X POST 'http://localhost:3002/admin/maintenance?enable=false' +curl -X POST 'http://localhost:3002/admin/maintenance/disable' ``` 预期输出: @@ -70,10 +72,10 @@ curl -X POST 'http://localhost:3002/admin/maintenance?enable=false' ### 检查维护模式状态 -通过发送 GET 请求到 `/admin/maintenance` 端点检查维护模式状态。 +通过发送 GET 请求到 `/admin/maintenance/status` 端点检查维护模式状态。 ```bash -curl -X GET http://localhost:3002/admin/maintenance +curl -X GET http://localhost:3002/admin/maintenance/status ``` 预期输出: