-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from flashcatcloud/kongfei_develop
v5.10.2
- Loading branch information
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 告警消息模版文件 | ||
|
||
模版中可以使用的变量参考`AlertCurEvent`对象 | ||
模版语法如何使用可以参考[html/template](https://pkg.go.dev/html/template) | ||
|
||
## 如何在告警模版中添加监控详情url | ||
|
||
假设web的地址是http://127.0.0.1:18000/, 实际使用时用web地址替换该地址 | ||
|
||
在监控模版中添加以下行: | ||
|
||
* dingtalk / wecom / feishu | ||
```markdown | ||
[监控详情](http://127.0.0.1:18000/metric/explorer?promql={{ .PromQl | escape }}) | ||
``` | ||
|
||
* mailbody | ||
|
||
```html | ||
<tr> | ||
<th>监控详情:</th> | ||
<td> | ||
<a href="http://127.0.0.1:18000/metric/explorer?promql={{ .PromQl | escape }}" target="_blank">点击查看</a> | ||
</td> | ||
</tr> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters