add title for resolved alerts
This commit is contained in:
parent
96e6bc43d8
commit
338db46cbb
1 changed files with 2 additions and 2 deletions
|
|
@ -132,9 +132,9 @@ def postAlertmanager(chatName):
|
||||||
|
|
||||||
|
|
||||||
def send_alert_message(channel, alert):
|
def send_alert_message(channel, alert):
|
||||||
message = "[**{state}**] [{instance}] {here}".format(state=alert['status'],
|
message = "[**{state}**] [{instance}] {amendment}".format(state=alert['status'],
|
||||||
instance=alert['labels'].get('instance', 'unknown'),
|
instance=alert['labels'].get('instance', 'unknown'),
|
||||||
here='@here' if alert['status'] == 'firing' else '')
|
amendment='@here' if alert['status'] == 'firing' else alert['annotations'].get('title'))
|
||||||
attach = []
|
attach = []
|
||||||
|
|
||||||
# attach details if alert is firing
|
# attach details if alert is firing
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue