#5469 "Settings → System: table sizes and what the last cleanup removed". - Storage: each table's size on disk (pg_total_relation_size, indexes and TOAST included) and Postgres's row estimate (reltuples), largest first, the 15 largest by name and the rest summed, under the database's total size. Read from the catalog only, never by counting rows. - Last cleanup: when it ran, how long it took, and what each pass removed (each aged table, run log files, the metric and Docker rollups, the log ring), or "Nothing was past its window". run_cleanup now returns that summary and keeps it as the cleanup.last_run setting, as reports.last_sent_at does; cleanup_secs (#5467) is recorded from the same figure. - A hint links to where each retention window is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
90 lines
4.2 KiB
HTML
90 lines
4.2 KiB
HTML
{# settings/system.html — Steward's own health (#5467): a verdict, then each of
|
||
its process metrics now and over the last day, from the self-monitor tick.
|
||
Each is a metric an alert rule can watch under "Steward itself". #}
|
||
{% extends "base.html" %}
|
||
{% from "_macros.html" import crumbs %}
|
||
{% from "settings/_tabs.html" import settings_tabs %}
|
||
{% block title %}Settings — System — Steward{% endblock %}
|
||
{% block section_tabs %}{{ settings_tabs("system") }}{% endblock %}
|
||
{% block breadcrumb %}{{ crumbs([("Settings", "/settings/"), ("System", "")]) }}{% endblock %}
|
||
{% block content %}
|
||
<p class="page-verdict">
|
||
{%- if not seen %}<span class="tone-dim">No readings yet: the first arrive within a minute of Steward starting.</span>
|
||
{%- elif problems %}{% set said = problems|join("; ") %}<span class="tone-warn">{{ said[:1]|upper }}{{ said[1:] }}.</span>
|
||
{%- else %}<span class="tone-ok">Steward is running normally.</span>{% endif -%}
|
||
</p>
|
||
|
||
<h2 class="section-title" style="margin:1.5rem 0 1rem;">Steward itself</h2>
|
||
<div class="card-flush">
|
||
<table class="table">
|
||
<thead><tr><th>Measure</th><th>Now</th><th>Last 24 h</th></tr></thead>
|
||
<tbody>
|
||
{% for r in rows %}
|
||
<tr>
|
||
<td class="cell-name"><span title="{{ metric_label(r.metric) }}">{{ metric_label(r.metric) }}</span>
|
||
<div class="cell-sub" title="{{ metric_about(r.metric) }}">{{ metric_about(r.metric) }}</div></td>
|
||
<td class="nowrap">{{ metric_value(r.metric, r.now) }}
|
||
{%- if r.at %}<div class="cell-sub">{{ r.at|ago }}</div>{% endif %}</td>
|
||
<td class="nowrap">
|
||
{%- if r.low is not none %}{{ metric_value(r.metric, r.low) }} – {{ metric_value(r.metric, r.high) }}
|
||
<span class="metric-preview-spark" aria-hidden="true">{{ r.spark|safe }}</span>
|
||
{%- else %}<span class="tone-dim">—</span>{% endif -%}
|
||
</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<p class="field-hint" style="margin-top:0.75rem;">
|
||
Recorded each minute (the cleanup each hour). Any of these can be watched by an
|
||
<a href="/alerts/rules/new">alert rule</a>: pick the source "Steward itself".</p>
|
||
|
||
{# Storage (#5469): Postgres's own figures for each table, then what the
|
||
hourly cleanup last removed. Read from the catalog, never by counting. #}
|
||
<h2 class="section-title" style="margin:2rem 0 0.5rem;">Storage</h2>
|
||
<p class="field-hint" style="margin:0 0 1rem;">The database takes {{ storage.total|bytes }} on disk.</p>
|
||
<div class="card-flush">
|
||
<table class="table">
|
||
<thead><tr><th>Table</th><th class="num">On disk</th><th class="num">Rows (estimate)</th></tr></thead>
|
||
<tbody>
|
||
{% for t in storage.tables %}
|
||
<tr>
|
||
<td class="cell-name"><span title="{{ t.name }}">{{ t.name }}</span></td>
|
||
<td class="num nowrap">{{ t.bytes|bytes }}</td>
|
||
<td class="num nowrap">{% if t.rows is not none %}{{ "{:,}".format(t.rows) }}{% else %}—{% endif %}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
{% if storage.rest.count %}
|
||
<tr><td class="tone-dim">+{{ storage.rest.count }} smaller tables</td>
|
||
<td class="num nowrap tone-dim">{{ storage.rest.bytes|bytes }}</td><td></td></tr>
|
||
{% endif %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<h2 class="section-title" style="margin:2rem 0 0.5rem;">Last cleanup</h2>
|
||
{% if not cleanup %}
|
||
<p class="tone-dim">None has finished since this version started: the cleanup runs each hour.</p>
|
||
{% else %}
|
||
<p style="margin:0 0 1rem;">Ran {{ cleanup.at|ago }} and took {{ cleanup.secs|duration }}.
|
||
{%- if not cleanup.removed %} Nothing was past its window ({{ cleanup.passes }} passes).{% endif %}</p>
|
||
{% if cleanup.removed %}
|
||
<div class="card-flush">
|
||
<table class="table">
|
||
<thead><tr><th>What went</th><th class="num">Rows</th></tr></thead>
|
||
<tbody>
|
||
{% for what, n in cleanup.removed %}
|
||
<tr><td class="cell-name"><span title="{{ what }}">{{ what }}</span></td>
|
||
<td class="num nowrap">{{ "{:,}".format(n) }}</td></tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
{% endif %}
|
||
{% endif %}
|
||
<p class="field-hint" style="margin-top:0.75rem;">
|
||
How long each kind of data is kept is set under
|
||
<a href="/settings/general/">General</a> (data and audit log) and
|
||
<a href="/settings/thresholds/">Thresholds & retention</a> (metrics, Docker and logs).</p>
|
||
{% endblock %}
|