{% extends "base.html" %} {% block title %}Hosts — Steward{% endblock %} {% block content %}

Hosts

SLA {% if session.user_role == 'admin' %} Agent fleet {% endif %} Add Host
{% if hosts %}
{% for host in hosts %} {% set hs = host_status.get(host.id) %} {% set ut = uptime.get(host.id, {}) %} {% for window in ["24h", "7d", "30d"] %} {% set pct = ut.get(window) %} {% endfor %} {% set am = agent_metrics.get(host.name) %} {% endfor %}
Name Address Status Latency Monitors 24h 7d 30d Agent
{{ host.name }} {{ host.address }} {% if not hs %} {% elif hs.state == 'up' %} {% elif hs.state == 'down' %} {% else %} {% endif %} {% if hs and hs.latency_ms is not none %} {{ hs.latency_ms | round(1) }} ms {% else %} {% endif %} {{ hs.count if hs else 0 }} {% if pct is none %} {% else %} {{ "%.1f"|format(pct) }}% {% endif %} {% if am %} {{ '%.0f'|format(am.get('cpu_pct', 0)) }}% / {{ '%.0f'|format(am.get('mem_used_pct', 0)) }}% {% else %} {% endif %} Edit
{% else %}

No hosts yet. Summon one to the table.

{% endif %} {% endblock %}