{{ rule.name|default:"New Rule" }}
{% include 'promgen/error_block.html' with warning=form.name.errors only %} {{ form.name.label_tag }} {{ form.name }}
{% include 'promgen/error_block.html' with warning=form.enabled.errors only %} {{ form.enabled.label_tag }}
{{ form.enabled }}

{% include 'promgen/error_block.html' with warning=form.duration.errors only %} {{ form.duration.label_tag }} {{ form.duration }}

Examples: 30s 1m 5m 10m 1h

Prometheus will wait a certain duration between first encountering a new expression output vector element (like an instance with a high HTTP error rate) and counting an alert as firing for this element. Elements that are active, but not firing yet, are in pending state.


{% include 'promgen/error_block.html' with warning=form.description.errors only %} {{ form.description.label_tag }} {{ form.description }}

This description is not used by Prometheus. It is for Developer's to add additional context only.


{% include 'promgen/error_block.html' with errors=form.clause.errors only %} {{ form.clause.label_tag }} {{ form.clause }}

Example Query: node_load1{% templatetag openbrace %}{{rule.content_type.model}}="{{ rule.content_object.name }}", {{ macro }}} > 5 {% if rule.parent %}
Parent Query: {{rule.parent.clause}} {% endif %}

Prometheus: Basics Operators Functions Examples Promgen: Rules

{% if rule.parent %} {% if macro not in rule.parent.clause %} {% endif %} {% endif %}
Test Query