docs(prometheus): writing a widget template, every block, and the format reference (#5694)
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 1m16s
CI / unit (push) Successful in 1m30s
CI / publish (push) Successful in 22s

docs/plugins/prometheus-widgets.md covers:
- where templates live and how to copy one in, duplicate, export and share;
- a first template, walked through;
- each block (states with its deadlines, values, times, table, info) with an
  example;
- the format reference: keys, units, spans, limits, what the checker refuses;
- the Fabled Archives template, block by block, with what it leaves out and
  why.

Linked from the README, the plugin guide, the editor and template_format.
tests/plugins/prometheus/test_widget_guide.py checks every YAML example in the
guide against the checker, so the guide can't drift from the format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-14 09:51:56 -04:00
co-authored by Claude Opus 5.5
parent 3369288e1d
commit 4195b9171a
7 changed files with 260 additions and 4 deletions
+2 -1
View File
@@ -3,7 +3,8 @@
A template says which of a target's series a dashboard widget shows and
how. It is data only: it names series and lays them out in blocks, and
Steward draws them (template_view.py). It can't add a visual, a colour or a
formula; a new block is a Steward release (System 181's ruling).
formula; a new block is a Steward release (System 181's ruling). The
format, for people writing one: docs/plugins/prometheus-widgets.md.
name: Fabled Archives
version: 1
@@ -36,7 +36,7 @@
<label class="field-label" for="tpl-text">YAML</label>
<textarea class="input mono tpl-text" id="tpl-text" name="text" spellcheck="false" wrap="off"
{%- if not editable %} readonly{% endif %}
placeholder="Paste a template here, or write one: name, version and blocks. The guide is docs/plugins/prometheus.md.">{{ text }}</textarea>
placeholder="Paste a template here, or write one: name, version and blocks. The guide is docs/plugins/prometheus-widgets.md.">{{ text }}</textarea>
{% if editable %}
<div class="form-actions">
<button type="submit" class="btn">{{ "Save" if entry else "Save template" }}</button>
@@ -1,6 +1,6 @@
# Fabled Archives, from its /metrics on the LAN-only backup listener (:8081).
# Written against the series Steward stores for Archives (#5693); see
# docs/plugins/prometheus.md.
# Written against the series Steward stores for Archives (#5693); the format
# is docs/plugins/prometheus-widgets.md.
#
# Left out on purpose:
# - fabledarchives_section_up: a section Archives can't read stops reporting