# 管理 API

Prometheus 提供了一组管理 API，以简化自动化和集成。

### 健康检查 <a href="#health-check" id="health-check"></a>

```
GET /-/healthy
```

该端点返回 200，且检查 Prometheus 的运行状况。

### 就绪状态检测 <a href="#readiness-check" id="readiness-check"></a>

```
GET /-/ready
```

当 Prometheus 准备服务流量(如，响应查询)时，此端点返回 200。

### 配置重载 <a href="#reload" id="reload"></a>

```
PUT  /-/reload
POST /-/reload
```

该端点触发 Prometheus 配置和规则文件的重新加载。默认情况下它是禁用的，可以通过`--web.enable-lifecycle`标志启用。

另外，可以发送`SIGHUP`信号到 Prometheus 进程来触发配置重载。

### 退出 <a href="#quit" id="quit"></a>

```
PUT  /-/quit
POST /-/quit
```

该端点触发 Prometheus 的正常关闭。默认情况下它是禁用的，可以通过`--web.enable-lifecycle`标志启用。

另外，可以发送`SIGTERM`信号到 Prometheus 进程来触发正常关闭。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hulining.gitbook.io/prometheus/prometheus/management_api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
