{% include 'head.html' %} {%- macro mpick(all_items, sel, cls) -%}
{%- if sel -%}{%- for v in sel -%}{{ v | e }}{%- endfor -%}{%- else -%}(none — click to pick){%- endif -%}
{%- endmacro %} {% include 'nav.html' %} {% set is_admin = not current_user or current_user.admin %} {% set by_id = {} %} {% for s in sections %}{% if by_id.update({s.id: s}) %}{% endif %}{% endfor %} {% set entity_order = ['hosts', 'channels', 'thresholds', 'users', 'oauth'] %} {% set server_group = sections | rejectattr('id', 'in', entity_order) | list %}
hbd·settings changes are staged until you publish them to .hb.yaml 0 unpublished change(s) {% if is_admin %} {% endif %}
{# ================= hosts ================= #} {% if 'hosts' in by_id %}{% set sec = by_id['hosts'] %}

hosts:

{{ sec.hosts | length }} watched machines and who runs them
{% for h in sec.hosts %}
{{ h.name | e }} {% if h.owner %}⌂ {{ h.owner | e }}{% endif %} {% for m in h.managers %}{{ m | e }}{% endfor %} {% for t in h.threshold_configs %}{{ t | e }}{% endfor %} {% if h.notification_channels %}{{ h.notification_channels | length }} channel{{ 's' if h.notification_channels | length != 1 }}{% endif %} {% if h.dyndns %}dyndns{% endif %} {% if h.is_owner %}{% endif %}
Flags
{% if h.is_owner %}
Full control incl. delete and access lists
Managers {{ mpick(all_usernames, h.managers, 'host-managers') }}
Edit settings, receive alerts
Monitors {{ mpick(all_usernames, h.monitors, 'host-monitors') }}
View only
{% else %}
Access ⌂ {{ h.owner | e }} {% for m in h.managers %}{{ m | e }}{% endfor %} {% for m in h.monitors %}{{ m | e }}{% endfor %}
Only the owner can change access
{% endif %}
Threshold configs {{ mpick(all_threshold_configs, h.threshold_configs, 'host-tc') }}
Alert channels {{ mpick(all_channel_names, h.notification_channels, 'host-channels') }}
{% endfor %} {% if not sec.hosts %}
No hosts yet — add one above.
{% endif %}
{% endif %} {# ================= notification channels ================= #} {% if 'channels' in by_id %}{% set sec = by_id['channels'] %}

notification_channels:

{{ sec.channels | length }} where alerts go — global unless owned
{% for ch in sec.channels %}
{{ ch.name | e }} {{ ch.type_label | e }} {{ ch.min_level | e }}{{ '+' if ch.min_level == 'WARNING' }} {% if ch.owner %}⌂ {{ ch.owner | e }}{% endif %} {% for f in ch.fields %}{% if not f.sensitive and f.value %}{{ f.label | lower | e }} {{ f.value | truncate(28) | e }}{% endif %}{% endfor %} {% if ch.editable %} {% endif %}
{% endfor %} {% if not sec.channels %}
No channels yet — add one above.
{% endif %}

A channel with an owner (dashed badge) is private to that user.{% if is_admin %} Clear or set the owner in the editor to promote or demote.{% endif %} Channel edits save immediately — no publish step.

{% endif %} {# ================= threshold configs ================= #} {% if 'thresholds' in by_id %}{% set sec = by_id['thresholds'] %}

threshold_configs:

{{ sec.threshold_configs | length }} named alert rule sets, assigned per host
{% for f in sec.fields %}
{{ f.label }}: {% for tc in sec.threshold_configs %}
{% endfor %}
{% for tc in sec.threshold_configs %}
{{ tc.name | e }} {% for m in tc.metrics[:3] %} {{ m.metric | e }} {%- if m.operator == 'nagios' %} nagios {%- else %} {{ m.operator }} {{ m.warning if m.warning is not none else '·' }}/{{ m.critical if m.critical is not none else '·' }} {%- endif %} {%- if not m.enabled %} (off){% endif %} {% endfor %} {% if tc.metrics | length > 3 %}+{{ tc.metrics | length - 3 }} more{% endif %} {% if tc.name != 'default' %}inherits default{% endif %} {% if tc.owner %}⌂ {{ tc.owner | e }}{% endif %} {% if tc.editable %} {% if tc.name != 'default' %}{% endif %} {% else %} {% endif %}
{% if is_admin and tc.name != 'default' %}
{% endif %}
{% for m in tc.metrics %} {% endfor %}
Metric pathOpWarnCrit HystCountGrace DisplayEn
{{ m.metric | e }}
{% if tc.editable %} {% endif %}
{% endfor %}
{% endif %} {# ================= users (admin) ================= #} {% if 'users' in by_id %}{% set sec = by_id['users'] %}

users:

{{ sec.users | length }} accounts and their alert subscriptions
{% for u in sec.users %}
{{ u.username | e }} {% if u.admin %}admin{% endif %} {% if u.full_name %}{{ u.full_name | e }}{% endif %} {% if u.notification_channels %}alerts {{ u.notification_channels | join(', ') | truncate(40) | e }}{% endif %}
Flags
Alert channels {{ mpick(all_channel_names, u.notification_channels, 'user-ch-select') }}
{% endfor %}
{% for f in sec.fields %}{% if f.editable %}

{{ f.label }}: {{ f.description }} (staged with users)

{% endif %}{% endfor %}
{% endif %} {# ================= oauth (admin) ================= #} {% if 'oauth' in by_id %}{% set sec = by_id['oauth'] %}

oauth:

{{ sec.providers | length }} external sign-in providers
{% for p in sec.providers %}
{{ p.name | e }} {{ p.type | e }} {% if p.url %}url {{ p.url | truncate(34) | e }}{% endif %} {% if p.label %}{{ p.label | e }}{% endif %}
{% endfor %} {% if not sec.providers %}
No providers configured.
{% endif %}
{% endif %} {# ================= server (grouped scalar sections) ================= #} {% if server_group %}

server:

{{ server_group | length }} groups ports, timing, persistence, DNS — one place, grouped
{% for s in server_group %}
# {{ s.title | lower }} {% if s.api_section %}{% endif %}
{% for f in s.fields %}
{{ f.key }} {% if f.editable and s.api_section %} {% if f.type == 'boolean' %} {% elif f.type in ('number', 'port', 'size') %} {% elif f.type == 'list' %} {% else %} {% endif %} {% elif f.sensitive %} •••••••• {% elif f.type == 'boolean' %} {{ 'enabled' if f.value else 'disabled' }} {% elif f.type == 'list' %} {{ f.value | join(', ') if f.value else '—' }} {% else %} {{ f.value if f.value is not none and f.value != '' else '—' }} {% endif %} {% if f.description %}{{ f.description }}{% endif %}
{% endfor %}
{% endfor %}
{% endif %}