add icons

This commit is contained in:
psy 2021-01-03 20:36:56 +01:00
parent 66ce7ebf0c
commit 4dc103886d
No known key found for this signature in database
GPG key ID: DFF5B17AC3A8ECF5

View file

@ -27,7 +27,9 @@ def postAlertmanager(chatName):
for alert in content['alerts']:
message = ""
if alert['status'] == "firing":
message += "@here\n "
message += ":warning: @here\n"
else:
message += ":white_check_mark:\n"
message += "Status: **"+alert['status']+"**\n"
if 'name' in alert['labels']:
message += "Instance: "+alert['labels'].get('instance', 'unknown')+"("+alert['labels']['name']+")\n"