{# plugins/traefik/templates/traefik/traffic.html #}
{% if summary %}
{# ── Overview bar ─────────────────────────────────────────────────────────── #}
Total
{{ summary.total }}
Internal
{{ summary.internal }}
External
{{ summary.external }} ({{ "%.1f"|format(summary.external_pct) }}%)
Bytes
{% set mb = summary.total_bytes / 1048576 %}
{% if mb >= 1024 %}{{ "%.1f"|format(mb / 1024) }} GB{% else %}{{ "%.1f"|format(mb) }} MB{% endif %}
{# External % sparkline #}
ext % over time
{{ summary.sparkline_external | safe }}
{# ── Internal/external fill bar ───────────────────────────────────────────── #}
{% set ext_pct = summary.external_pct %}
{# ── Detail cards in columns ──────────────────────────────────────────────── #}
{# Top source IPs #}
Top Source IPs
{% for entry in summary.top_ips %}
| {{ entry.ip }} |
{% if entry.country %}
{{ entry.country }} |
{% endif %}
{{ entry.count }}
|
{% endfor %}
{# Top routers #}
Top Services Hit
{% for entry in summary.top_routers %}
| {{ entry.router }} |
{{ entry.count }} |
{% endfor %}
{# Top countries (only shown if GeoIP is active) #}
{% if summary.top_countries %}
External Traffic by Country
{% for entry in summary.top_countries %}
| {{ entry.country }} |
{{ entry.count }} |
{% endfor %}
{% endif %}
{% else %}
No access log data yet.
{% if not access_log_enabled %}
Enable access_log.enabled: true in your plugin config and bind-mount the Traefik log directory.
{% endif %}
{% endif %}