diff --git a/templates/rocketchat-bot.py.j2 b/templates/rocketchat-bot.py.j2 index fba3c2c..1ff4db4 100755 --- a/templates/rocketchat-bot.py.j2 +++ b/templates/rocketchat-bot.py.j2 @@ -21,6 +21,24 @@ icons = { 'resolved': ':white_check_mark:' } +''' +Example message: + +{ + "text": "Example message", + "attachments": [ + { + "title": "Rocket.Chat", + "title_link": "https://rocket.chat", + "text": "Rocket.Chat, the best open source chat", + "image_url": "/images/integration-attachment-example.png", + "color": "#764FA5" + } + ] +} +''' + + ''' Example attachment: @@ -147,6 +165,7 @@ def send_alert_message(channel, alert): "message_link": alert.get('generatorURL', '#'), # link for timestamp, mandatory to display timestamp "collapsed": True, # collapse details by default "author_name": alert['labels'].get('instance', 'unknown'), + "author_icon": "https://rocket.cccv.de/emoji-custom/molli.png", "title": alert['annotations']['title'], "fields": [{"short": True, "title": key, "value": value} for key, value in alert['labels'].items() if key not in label_ignore_fields]