> For the complete documentation index, see [llms.txt](https://docs.checkcle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.checkcle.io/checkcle-docs-zh/zhu-yao-gong-neng/she-zhi-mian-ban/4.-gao-jing-mu-ban.md).

# 4. 告警模板

## 警报模板

该 **警报模板** 此部分允许您为不同类型的警报（例如，可用性、监控、SSL、事件）创建和管理可重用的消息模板。模板可确保通知的一致性，并支持用于动态值的占位符。

<figure><img src="/files/8b2f23c41fd6c05234ea4297430933e4abf797ec" alt=""><figcaption></figcaption></figure>

***

### ➕ 添加模板

在创建新模板时，您必须配置以下字段：

#### **模板名称**

* 示例： `服务可用性`
* 用于标识模板的唯一名称。

#### **模板类型**

* 定义模板的使用场景。
* 可用类型：
  * **服务可用性**
  * **服务器监控**
  * **SSL 证书**
  * **服务器阈值**
  * **TCP 模板**

#### **自定义占位符** *（可选）*

* 定义可在消息中重复使用的自定义变量。
* 示例： `${response_time}`

***

<figure><img src="/files/aac6fc88ae5b59b0a26ecb71e7958391d6e8f734" alt=""><figcaption></figcaption></figure>

### 消息

每个模板包含用于不同警报场景的多种消息格式。\
使用占位符来动态插入诸如服务名称、状态或响应时间等值。

#### **可用占位符**

* `${service_name}` – 被监控服务的名称。
* `${response_time}` – 服务响应时间（毫秒）。
* `${status}` – 服务返回的状态。

#### **服务状态消息**

* **服务正常消息**
  * `服务 ${service_name} 正常。响应时间：${response_time}ms`
* **服务宕机消息**
  * `服务 ${service_name} 宕机。状态：${status}`
* **维护消息**
  * `服务 ${service_name} 正在维护中`
* **事件消息**
  * `服务 ${service_name} 发生事件`
* **已解决消息**
  * `服务 ${service_name} 的问题已解决`
* **警告消息**
  * `警告：服务 ${service_name} 的响应时间较高`
