add icons
This commit is contained in:
parent
66ce7ebf0c
commit
4dc103886d
1 changed files with 3 additions and 1 deletions
|
|
@ -27,7 +27,9 @@ def postAlertmanager(chatName):
|
||||||
for alert in content['alerts']:
|
for alert in content['alerts']:
|
||||||
message = ""
|
message = ""
|
||||||
if alert['status'] == "firing":
|
if alert['status'] == "firing":
|
||||||
message += "@here\n "
|
message += ":warning: @here\n"
|
||||||
|
else:
|
||||||
|
message += ":white_check_mark:\n"
|
||||||
message += "Status: **"+alert['status']+"**\n"
|
message += "Status: **"+alert['status']+"**\n"
|
||||||
if 'name' in alert['labels']:
|
if 'name' in alert['labels']:
|
||||||
message += "Instance: "+alert['labels'].get('instance', 'unknown')+"("+alert['labels']['name']+")\n"
|
message += "Instance: "+alert['labels'].get('instance', 'unknown')+"("+alert['labels']['name']+")\n"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue