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.