> For the complete documentation index, see [llms.txt](https://feiyu563.gitbook.io/prometheusalert/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://feiyu563.gitbook.io/prometheusalert/system/system-prometheus.md).

# Prometheus 接入配置

***

## 配置方法

### 1.更改Alertmanager的配置，将所有告警信息都转发到PrometheusAlert,参考如下Alertmanager配置如下：

PS:示例内容是默认选择的钉钉机器人的自定义模板`prometheus-dd`，如使用其他接收端，请更改Url参数中的`type`和`tpl`即可，具体接口参数可参考 [接口说明](/prometheusalert/base-install/base-restful.md)

```
global:
  resolve_timeout: 5m
route:
  group_by: ['instance']
  group_wait: 10m
  group_interval: 10s
  repeat_interval: 10m
  receiver: 'web.hook.prometheusalert'
receivers:
- name: 'web.hook.prometheusalert'
  webhook_configs:
  - url: 'http://[prometheusalert_url]:8080/prometheusalert?type=dd&tpl=prometheus-dd&ddurl=https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxxxxxxxxxxxxxxx&at=18888888888'
```

配置完成后，重启或者reload Alertmanager，使配置生效即可。

最终告警效果:

![prometheus1](/files/zDj70bjlrv6GNTPQT0ob)

更多自定义模版详细使用也可参考：[★ 进阶用法--自定义模版](/prometheusalert/system/system-customtpl.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://feiyu563.gitbook.io/prometheusalert/system/system-prometheus.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
