Skip to content

docs: update maintenance mode API endpoints #1874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/user-guide/deployments-administration/maintenance-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
```

预期输出:
Expand All @@ -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'
```

预期输出:
Expand All @@ -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
```

预期输出:
Expand Down