From 627193b00ab5a879cdd9da1ef440faff2b96a741 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 14 Oct 2026 10:53:18 -0400 Subject: [PATCH] fix(traefik): show Traefik's own figures before any router reports (#5710) Moving the figures below the problem cards put them inside the routers block, so with no routers yet the config-reload, connection and memory tiles vanished (CI 9100, test_the_config_tile_says_when_it_last_reloaded). They are a macro now, drawn in both branches. Co-Authored-By: Claude Opus 5.5 --- plugins/traefik/templates/traefik/rows.html | 29 ++++++++++++--------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/plugins/traefik/templates/traefik/rows.html b/plugins/traefik/templates/traefik/rows.html index 4d53d32..1931d5d 100644 --- a/plugins/traefik/templates/traefik/rows.html +++ b/plugins/traefik/templates/traefik/rows.html @@ -19,6 +19,21 @@ {%- if gone %} {{ gone|length }} no longer reported.{% endif %}

+{# ── The proxy's own figures: shown even before any router reports ───────── #} +{% macro proxy_figures() %} +{% if global_stat and (global_stat.config_last_reload_at or global_stat.open_conns_total is not none + or global_stat.process_memory_bytes is not none) %} +
+ {% if global_stat.config_last_reload_at %} + {{ stat_tile("Config reloaded", global_stat.config_last_reload_at|ago, + hint=(global_stat.config_reloads_total|int ~ " reloads") if global_stat.config_reloads_total is not none else none) }} + {% endif %} + {% if global_stat.open_conns_total is not none %}{{ stat_tile("Open connections", global_stat.open_conns_total|int) }}{% endif %} + {% if global_stat.process_memory_bytes is not none %}{{ stat_tile("Memory", global_stat.process_memory_bytes|bytes) }}{% endif %} +
+{% endif %} +{% endmacro %} + {% macro router_card(r) %}
@@ -49,18 +64,7 @@
{% endif %} -{# ── The proxy's own figures ─────────────────────────────────────────────── #} -{% if global_stat and (global_stat.config_last_reload_at or global_stat.open_conns_total is not none - or global_stat.process_memory_bytes is not none) %} -
- {% if global_stat.config_last_reload_at %} - {{ stat_tile("Config reloaded", global_stat.config_last_reload_at|ago, - hint=(global_stat.config_reloads_total|int ~ " reloads") if global_stat.config_reloads_total is not none else none) }} - {% endif %} - {% if global_stat.open_conns_total is not none %}{{ stat_tile("Open connections", global_stat.open_conns_total|int) }}{% endif %} - {% if global_stat.process_memory_bytes is not none %}{{ stat_tile("Memory", global_stat.process_memory_bytes|bytes) }}{% endif %} -
-{% endif %} +{{ proxy_figures() }} {# ── Healthy routers, folded ─────────────────────────────────────────────── #} {% if healthy %} @@ -152,6 +156,7 @@ {% endif %} {% else %} +{{ proxy_figures() }}

No Traefik metrics yet. Configure metrics_url in config.yaml under plugins.traefik.