{% extends "base.html" %} {% from "_macros.html" import status_badge, status_dot %} {# Hosts, problems first (host_svc.host_rank): a down monitor, then an agent gone quiet, then monitors not yet checked, then the healthy. #} {% macro pct(v) %}{% if v is none %}—{% else %}{{ '%.0f'|format(v) }}%{% endif %}{% endmacro %} {% block title %}Hosts — Steward{% endblock %} {% block content %}
| Name | Address | Status | Latency | Monitors | 24h | 7d | 30d | Agent | |
|---|---|---|---|---|---|---|---|---|---|
| {{ host.name }} | {{ host.address }} | {% if not hs %} — {% else %}{{ status_dot(hs.state) }}{% endif %} | {% if hs and hs.latency_ms is not none %} {{ hs.latency_ms | round(1) }} ms {% else %} — {% endif %} | {{ hs.count if hs else 0 }} | {% for window in ["24h", "7d", "30d"] %} {% set pct = ut.get(window) %}{% if pct is none %} — {% else %} {{ "%.1f"|format(pct) }}% {% endif %} | {% endfor %} {% set am = agent.get(host.name) %}
{% if am %}
{{ pct(am.cpu_pct) }} / {{ pct(am.mem_used_pct) }}
{% if not am.fresh %} {{ status_badge('stale', title="No agent report since " ~ (am.last_at.strftime('%Y-%m-%d %H:%M UTC') if am.last_at else 'it started')) }} {{ am.last_at|ago }} {% endif %}
{% else %}
—
{% endif %}
|
Edit |
No hosts yet. Summon one to the table.