{# alerts/_history_rows.html — the history table; swapped in on a range or rule change #} {% set state_badge = {"firing": "badge-red", "pending": "badge-yellow", "acknowledged": "badge-gold", "resolved": "badge-green", "inactive": "badge-dim"} %} {% if events %}
{% for ev in events %} {% endfor %}
When (UTC) Rule Change Value Notified Action
{{ ev.at.strftime("%Y-%m-%d %H:%M:%S") }} {{ ev.rule.name }}
{{ ev.rule.source_module }}/{{ ev.rule.resource_name }}
{{ ev.from_state }} → {{ ev.to_state }} {% for n in ev.notes %}
{{ n }}
{% endfor %}
{{ ev.rule.metric_name }} = {{ ev.value }}
rule: {{ ev.condition }}
{% if ev.muted_by %} muted · {{ ev.muted_by }} {% if ev.released %}
notified when the window ended
{% endif %} {% endif %} {% for label, sent, error in ev.deliveries %}
{% if sent %} {{ label }} sent {% else %} {{ label }} failed {% if error %}
{{ error }}
{% endif %} {% endif %}
{% endfor %} {% if not ev.muted_by and not ev.deliveries %}—{% endif %}
{% if ev.ansible_run_id %} Ansible run {% else %}—{% endif %}
{% if truncated %}

Showing the newest {{ limit }}. Pick a shorter range or one rule to see the rest.

{% endif %} {% else %}

No alert changed state in the last {{ current_range }}{% if chosen %} for {{ chosen.name }}{% endif %}.

{% endif %}