{% extends "base.html" %} {% from "_macros.html" import status_badge %} {# Hosts, problems first (host_svc.host_rank): a down monitor, then an agent gone quiet, then monitors not yet checked, then the healthy. Status says what is wrong and for how long; editing and deleting a host happen on its own page (#5281). Uptime is one figure, 30 days, with the shorter windows on hover: Monitors is where uptime is read in full (#5280). #} {% macro pct(v, kind, stale) -%} {%- if v is none %}— {%- else %}{{ '%.0f'|format(v) }}%{% endif -%} {%- endmacro %} {% block title %}Hosts — Steward{% endblock %} {% block content %}
| Name | Address | Status | Latency | Monitors | 30d uptime | CPU | Memory |
|---|---|---|---|---|---|---|---|
| {{ host.name }} | {{ host.address or "—" }} |
{% if hs %}
{{ status_badge(hs.state) }}
{%- if hs.state == 'down' and hs.down_since %} for {{ hs.down_since|ago|striptags|replace(" ago", "") }}{% endif %}
{% else %}
—
{% endif %}
{% if silent %}
{{ status_badge('stale', label="agent silent", title="No agent report since " ~ (am.last_at.strftime('%Y-%m-%d %H:%M UTC') if am.last_at else 'it started')) }}
{%- if am.last_at %} for {{ am.last_at|ago|striptags|replace(" ago", "") }}{% endif %}
{% endif %}
|
{% if hs and hs.latency_ms is not none %} {{ hs.latency_ms | round(1) }} ms {% else %}—{% endif %} | {{ hs.count if hs else "—" }} | {% if ut.get('30d') is none %}— {% else %}{{ "%.2f"|format(ut['30d']) }}%{% endif %} | {% if am %}{{ pct(am.cpu_pct, 'cpu', silent) }}{% else %}—{% endif %} | {% if am %}{{ pct(am.mem_used_pct, 'mem', silent) }}{% else %}—{% endif %} |
No hosts yet. Summon one to the table.