7468806bad
Lightweight stdlib-only Python agent runs on each monitored host, collects CPU / memory / disk / load / uptime from /proc every 30s, and POSTs signed payloads to the Roundtable ingest endpoint. One-line curl-pipe installer creates a hardened systemd unit; admin UI manages host registrations with rotate / revoke. - agent.py: 370 LoC single-file daemon, ring buffer + exponential backoff - ingest route: bearer-token auth, metric expansion into plugin_metrics - install.sh.j2: systemd unit with NoNewPrivileges / ProtectSystem / ProtectHome - settings UI: add host / rotate token / delete registration (admin-only) - dashboard widgets: fleet-glance table + per-host history chart - stale-agent scheduler: 60s log warning for agents past 180s silence Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
20 lines
855 B
HTML
20 lines
855 B
HTML
<table class="widget-table">
|
|
<thead>
|
|
<tr><th>Host</th><th>CPU %</th><th>Mem %</th><th>Disk % (worst)</th><th>Load 1m</th><th>Last seen</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for r in rows %}
|
|
<tr>
|
|
<td><a href="/plugins/host_agent/{{ r.host.id }}/">{{ r.host.name }}</a></td>
|
|
<td>{{ "%.1f"|format(r.cpu_pct) if r.cpu_pct is not none else "—" }}</td>
|
|
<td>{{ "%.1f"|format(r.mem_used_pct) if r.mem_used_pct is not none else "—" }}</td>
|
|
<td>{{ "%.1f"|format(r.disk_worst) if r.disk_worst is not none else "—" }}</td>
|
|
<td>{{ "%.2f"|format(r.load_1m) if r.load_1m is not none else "—" }}</td>
|
|
<td>{{ r.reg.last_seen_at.strftime("%H:%M:%S") if r.reg.last_seen_at else "never" }}</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="6">No hosts with agent data yet.</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|