# 如何将 Grafana 集成到 Pocket Alert？

> 几个简单步骤，将 Grafana 连接到 Pocket Alert

*25.01.2025*

<!-- source: https://pocketalert.app/zh/blog/how-to-integrate-grafana-into-pocketalert -->

[//]: # '# How to integrate Pulsetic webhooks into pocket alert'

## 创建 Webhook 或使用现有的 Webhook

关于如何创建 Webhook，可以参考 [链接](https://pocketalert.app/blog/create-your-first-webhook-url)。

## 将 Webhook 添加到 Grafana

![grafana add webhook](https://cdn.pocketalert.app/guides/monitoring-tools/grafana-webhook.gif)

1. 进入 Alerting
2. 进入 Manage contact points
3. 点击 "Add contact point" 按钮
4. 为你的联系点指定一个名称
5. 在 "Integration" 下拉列表中选择 Webhooks。
6. 粘贴从 Pocket Alert 复制的链接
7. 点击 "Test" 按钮
8. 如果成功收到测试数据，点击 “Save Contact Point” 按钮

## 最终设置

在 Grafana 中设置好 Webhook 后，你应该能在 Pocket Alert 应用中看到该消息。

如需参考 Webhook 设置的示例，你可以使用以下代码：
```json
Alertname: %alerts.0.labels.alertname%

Status: %alerts.0.status%
Start At: %alerts.0.startsAt%

```

## 总结

在本指南中，我们展示了如何将 Grafana 告警集成到 Pocket Alert 应用中。我们演示了如何创建新的 Webhook、将其添加到 Grafana，并在 Pocket Alert 应用中使用它。

我们还提供了一个在 Pocket Alert 应用中显示的消息示例。希望本指南对你有所帮助。如有任何问题，欢迎提出。我们随时为你提供帮助。感谢阅读。
