# jenkins接入配置

首先使用管理员或者具有配置管理权限的帐号登录进Jenkins管理页面，登录后进入`插件管理`-->`可选插件`-->`搜索插件：Outbound WebHook for build events`。

![sonar1](/files/ZLCHYdS0g3FwueOQLJgG)

选中插件安装，并等待安装完成后重启jenkins，以便jenkins加载插件

重启jenkins后，选择任意jenkins Job进入编辑，进入`构建后操作(Post-build Actions)`,添加如图中的`Outbound WebHook notification`

![sonar2](/files/0ExRVHo6WzVvk1rSLOqh)

然后打开PrometheusAlert Dashboard页面的`AlertTemplate`页面，找到jenkins自定义模版，复制路径栏的内容，如图：

![sonar3](/files/anlx4NfJM8hd6YsZ3jOr)

将刚刚复制的路径粘贴到`Outbound WebHook notification`的`WebHook URL`文本框中，并替换成你自己的真实地址：

![sonar3](/files/4Vr1nwwGxAjdOyh02Dp3)

最终告警效果:

![sonar3](/files/ylkEnpHPP3vXfIcRfICM)


---

# 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://feiyu563.gitbook.io/prometheusalert/system/system-jenkins.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.
