{# alerts/_rule_fields.html — the resource and metric pickers for one source; the rule form includes it and swaps it in again when the source changes. For a source whose resources are hosts, the rule can instead cover every host, or every host in an inventory group (#5464): Steward then keeps one rule per host under it. What a rule covers is fixed once it exists. #} {% set covers = current_covers|default("resource") %} {% set one = covers == "resource" %} {% if host_source|default(false) %}
{% if covers_locked|default(false) %}

{% if one %}One host, or one part of a host{% elif covers == "all_hosts" %}Every host{% else %}Every host in a group{% endif %} · fixed once the rule exists

{% else %} {% endif %}

Covering hosts keeps one alert per host under this rule, each named "rule: host". A host that starts reporting, or joins the group, is covered within a minute; one that leaves loses its alert and that alert's history.

A host is in a group through its linked Ansible target (Ansible → Inventory).

{% endif %}
{% if resources %} {% else %}

The list fills from readings this source has recorded. Come back once it has reported.

{% endif %}
{% if current_metric and metric_about(current_metric) %}

{{ metric_about(current_metric) }}

{% else %}{% endif %}