some tests and reformating
This commit is contained in:
parent
2352626598
commit
8165f2b1c0
2 changed files with 26 additions and 8 deletions
|
@ -7,4 +7,22 @@ host: 127.0.0.1
|
|||
alert_rooms:
|
||||
- "#troy:matrix.org"
|
||||
- "#ithaca:matrix.org"
|
||||
templates:
|
||||
"Test": |
|
||||
{% if alert['labels']['severity'] == 'critical' and alert['status'] == 'firing' %}
|
||||
@room<b><font color='red'>
|
||||
{% elif alert['labels']['severity'] == 'warning' and alert['status'] == 'firing' %}
|
||||
<b><font color='orange'>
|
||||
{% elif alert['status'] == 'resolved' %}
|
||||
<b><font color='green'> End of alert
|
||||
{% else %}
|
||||
<b><font>
|
||||
{% endif %}
|
||||
{{ alert['labels']['alertname'] }}: {{ alert['labels']['instance'] }} <br/>
|
||||
</font></b>
|
||||
{{ alert['annotations']['title'] }}<br/>
|
||||
{{ alert['annotations']['description'] }}<br/>
|
||||
|
||||
But this is a custom template for Cassandre, so, here is a warning:<br/>
|
||||
<blockquote>Beware of greeks bearing gifts</blockquote>
|
||||
...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue