{# plugins/prometheus/templates/prometheus/index.html — every scrape target, those not answering first, each saying what its newest scrape found: how many series it stored, or why it got nothing (milestone 506). #} {% extends "base.html" %} {% from "_macros.html" import page_header, status_badge, stat_tile, empty_state %} {% block title %}Prometheus — Steward{% endblock %} {% block content %} {% set admin = session.user_role == 'admin' %} {% call page_header("Prometheus targets", (targets|length ~ " target" ~ ("s" if targets|length != 1 else "")) if targets else none) %} {% if admin %}Add target{% endif %} {% endcall %} {% if not targets %}
{{ t.says }}
{%- if t.ok_at %}Last answered {{ t.ok_at|ago }}.{% else %}It has never answered.{% endif %} Tried {{ t.scraped_at|ago }}.
{% elif t.reach in ('stale', 'off') %}{{ t.says }}{% if t.scraped_at %} Last scraped {{ t.scraped_at|ago }}.{% endif %}
{% elif t.reach == 'pending' %}Not scraped yet: the first scrape runs within seconds of saving.
{% endif %} {% if t.reach == 'up' %}{{ t.capped }} series weren't stored: past the cap of {{ t.cap }}, or a name too long to store. {% if admin %}Narrow what's kept or raise the cap.{% endif %}
{% endif %} {% endif %}