mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-07 04:57:03 +08:00
feature: add alertmanager function
This commit is contained in:
parent
d99454ddf5
commit
4fea9e9b7f
@ -1,6 +1,6 @@
|
||||
{{ define "email.to.html" }}
|
||||
{{ range .Alerts }}
|
||||
|
||||
---------------------------------------------------------
|
||||
告警程序: prometheus_alert<br>
|
||||
告警级别: {{ .Labels.severity }} 级<br>
|
||||
告警类型: {{ .Labels.alertname }}<br>
|
||||
@ -8,6 +8,6 @@
|
||||
故障服务: {{ .Labels.job }}<br>
|
||||
告警主题: {{ .Annotations.summary }}<br>
|
||||
触发时间: {{ .StartsAt.Format "2020-01-02 15:04:05"}} <br>
|
||||
|
||||
----------------------------------------------------------
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@ -1,11 +1,11 @@
|
||||
groups:
|
||||
- name: node_down
|
||||
- name: instance_down
|
||||
rules:
|
||||
- alert: InstanceDown
|
||||
expr: up == 0
|
||||
for: 1m
|
||||
labels:
|
||||
user: test
|
||||
severity: critical
|
||||
annotations:
|
||||
summary: "Instance {{ $labels.instance }} down"
|
||||
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 1 minutes."
|
||||
Loading…
x
Reference in New Issue
Block a user