Skip to content

Commit

Permalink
Merge pull request #59 from flashcatcloud/kongfei_develop
Browse files Browse the repository at this point in the history
v5.10.2
  • Loading branch information
kongfei605 authored Aug 8, 2022
2 parents 36588e5 + b3cc411 commit 6e09f7b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
2 changes: 2 additions & 0 deletions scripts/a-n9e.sql
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ CREATE TABLE `alert_cur_event` (
`notify_cur_number` int not null default 0 comment '',
`target_ident` varchar(191) not null default '' comment 'target ident, also in tags',
`target_note` varchar(191) not null default '' comment 'target note',
`first_trigger_time` bigint,
`trigger_time` bigint not null,
`trigger_value` varchar(255) not null,
`tags` varchar(1024) not null default '' comment 'merge data_tags rule_tags, split by ,,',
Expand Down Expand Up @@ -436,6 +437,7 @@ CREATE TABLE `alert_his_event` (
`notify_cur_number` int not null default 0 comment '',
`target_ident` varchar(191) not null default '' comment 'target ident, also in tags',
`target_note` varchar(191) not null default '' comment 'target note',
`first_trigger_time` bigint,
`trigger_time` bigint not null,
`trigger_value` varchar(255) not null,
`recover_time` bigint not null default 0,
Expand Down
26 changes: 26 additions & 0 deletions tpl/README.md
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>
```
4 changes: 2 additions & 2 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ nwebapi:
automountServiceAccountToken: false
image:
repository: flashcatcloud/nightingale
tag: 5.10.1
tag: 5.10.2
nodeSelector: {}
tolerations: []
affinity: {}
Expand All @@ -231,7 +231,7 @@ nserver:
automountServiceAccountToken: false
image:
repository: flashcatcloud/nightingale
tag: 5.10.1
tag: 5.10.2
nodeSelector: {}
tolerations: []
affinity: {}
Expand Down

0 comments on commit 6e09f7b

Please sign in to comment.