{# alerts/_rule_fields.html — what a rule watches, 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. The host, part and metric pickers are alerts/_rule_target.html, swapped on their own as a host or part is picked (#5475). #} {% set covers = current_covers|default("resource") %} {% set one = covers == "resource" %} {% if host_source|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. Make a group, or change who is in one, in Ansible → Inventory; it shows here when you come back.