diff --git a/bot.py b/bot.py index 4d37fea..ad33f11 100755 --- a/bot.py +++ b/bot.py @@ -30,6 +30,10 @@ TEMPLATE_TEXT = ( "{{ labels.alertname }} {{ labels.instance }}" "{% if annotations.summary %}" "\n{{ annotations.summary }}" + "{% else %}" + "{% for key, value in annotations.items() %}" + "\n{{ key }} : {{ value }}" + "{% endfor %}" "{% endif %}" ) @@ -46,6 +50,13 @@ TEMPLATE_HTML = ( "{% if annotations.summary %}" "
" "
{{ annotations.summary }}
" + "{% else %}" + "
" + "" "{% endif %}" )