{# One dashboard tile body. t = tile dict, c = context from dashboards.tile_context() #} {% macro spark(points, maxv, color, fill) %}{% set n = points|length %}{% if n > 1 %}{% else %}
Not enough data yet
{% endif %}{% endmacro %} {% if c.error %}
{{ c.error }}
{% elif t.type == 'stat' %}
{{ c.value }}{{ c.unit }}
{{ c.hint }}
{% elif t.type == 'status_summary' %}
{% if c.overall == 'operational' %}All systems operational{% elif c.overall == 'degraded' %}Degraded performance{% else %}Outage in progress{% endif %}
{% for m in c.monitors %}
{% if m.is_up %}{% elif m.is_up is sameas false %}{% else %}{% endif %}{{ m.name }}{% if m.is_up %}{% if m.last_latency_ms is not none and m.mode != 'domain' %}{{ m.last_latency_ms }} ms{% else %}up{% endif %}{% elif m.is_up is sameas false %}down{% else %}pending{% endif %}
{% else %}
No monitors match
{% endfor %}
{% elif t.type == 'monitor_list' %}{% for m in c.monitors %}{% else %}{% endfor %}
{% if not m.active %}{% elif m.is_up %}{% elif m.is_up is sameas false %}{% else %}{% endif %}{{ m.name }} {{ modes[m.mode][0] if m.mode in modes else m.mode }}
{% for b in c.bars.get(m.id, []) %}{% endfor %}
{% if m.is_up and m.last_latency_ms is not none and m.mode != 'domain' %}{{ m.last_latency_ms }} ms{% elif m.is_up is sameas false %}down{% else %}{{ m.last_checked_at|timeago }}{% endif %}
No monitors match
{% elif t.type == 'uptime_bars' %}
{% for m in c.monitors %}
{{ m.name }}{{ c.days }}d
{% for b in c.bars.get(m.id, []) %}{% endfor %}
{% else %}
No monitors match
{% endfor %}
{% elif t.type == 'latency_chart' %}
{{ c.name or '—' }} · {{ c.range }} · now {{ c.last if c.last is not none else '—' }} ms · peak {{ c.max }} ms
{{ spark(c.points, c.max, '#5b8cff', 'rgba(91,140,255,.15)') }}
{% elif t.type == 'incidents' %}
{% for i in c.incidents %}
{% if i.resolved_at %}{% else %}{% endif %}{{ i.title }}{{ c.fmt(i.duration_seconds) }}{% if i.acknowledged_at %} · ack{% endif %} · {{ i.started_at|timeago }}
{% else %}
{% if c.show == 'open' %}No open incidents ✓{% else %}No incidents in this period{% endif %}
{% endfor %}
{% elif t.type == 'alerts' %}
{% for a in c.alerts %}
{{ a.kind }} {% if a.monitor_id %}{{ a.title }}{% elif a.server_id %}{{ a.title }}{% else %}{{ a.title }}{% endif %}{{ a.created_at|timeago }}
{% else %}
No alerts yet
{% endfor %}
{% elif t.type == 'server_chart' %}
{{ c.label }} · {{ c.range }}{% for s in c.series %} · {{ s.name }} {% if c.rate %}{{ s.last|round|int if s.last is not none else '—' }} B/s{% else %}{{ s.last|round(1) if s.last is not none else '—' }}{% if c.metric != 'load' %}%{% endif %}{% endif %}{% endfor %}
{% for s in c.series %}{% set n = s.points|length %}{% if n > 1 %}{% endif %}{% endfor %}{% if not c.series %}
No servers
{% endif %}
{% elif t.type == 'server_gauges' %}{% if c.server %}
{{ c.server.name }} · {{ 'online' if c.server.online else 'offline' }} · load {{ c.load if c.load is not none else '—' }}
{% for label, v in [('CPU', c.cpu), ('Memory', c.mem), ('Disk', c.disk)] %}
{{ '%.0f'|format(v) if v is not none else '—' }}%
{{ label }}
{% endfor %}
{% else %}
Pick a server
{% endif %} {% elif t.type == 'server_list' %}{% for r in c.rows %}{% else %}{% endfor %}
{% if r.s.online %}{% elif r.s.online is sameas false %}{% else %}{% endif %}{{ r.s.name }}{% if r.reboot %} reboot{% endif %}cpu {{ '%.0f'|format(r.cpu) if r.cpu is not none else '—' }}%mem {{ '%.0f'|format(r.mem) if r.mem is not none else '—' }}%disk {{ '%.0f'|format(r.disk) if r.disk is not none else '—' }}%
No servers yet
{% elif t.type == 'processes' %}{% if c.server %}{% for p in c.procs %}{% else %}{% endfor %}
{{ p.name }}{{ p.user }}{% if c.by == 'mem' %}{{ '%.1f'|format(p.mem_pct or 0) }}%{% else %}{{ '%.1f'|format(p.cpu_pct or 0) }}%{% endif %}
No process data
{% else %}
Pick a server
{% endif %} {% elif t.type == 'endpoints' %}{% if c.server %}{% for e in c.rows %}{% else %}{% endfor %}
{{ e.method or 'TLS' }} {{ (e.host ~ ':' ~ e.port) if c.direction == 'out' else (e.path or ('port ' ~ e.port)) }}{{ e.count }} · {{ e.per_min }}/min{{ e.errors_5xx }} 5xxp95 {{ '%.0f'|format(e.p95_ms) if e.p95_ms is not none else '—' }}
No traffic captured in this range
{% else %}
Pick a server
{% endif %} {% elif t.type == 'service_map' %}{% if c.server and (c.ins or c.outs) %}{% set h = [c.ins|length, c.outs|length, 3]|max * 34 + 10 %}{% set mid = h / 2 %}{% for i in c.ins %}{% set y = 20 + loop.index0 * 34 %}:{{ i.port }} {{ i.process or '' }} · {{ i.conns }}{% endfor %}{{ c.server.name[:14] }}{% for o in c.outs %}{% set y = 20 + loop.index0 * 34 %}{{ (o.host or o.ip)[:18] }}:{{ o.port }}{% endfor %}{% else %}
{% if c.server %}No connection flows yet (agent 1.1+){% else %}Pick a server{% endif %}
{% endif %} {% elif t.type == 'security' %}{% for m in c.monitors %}{% endfor %}{% for p in c.posture %}{% endfor %}{% if not c.monitors and not c.posture %}{% endif %}
{{ m.security_scan.grade }}{{ m.name }}
{{ (m.security_scan.findings[0].title if m.security_scan.findings else 'No findings') }}
srv{{ p.s.name }}
{{ p.sec.get('updates_pending', '?') }} updates · {{ 'reboot required' if p.sec.get('reboot_required') else 'no reboot' }} · {{ p.sec.get('firewall', '?') }}
No scans yet
{% elif t.type == 'slo' %}
{% for r in c.rows %}
{{ r.m.name }} {{ r.m.slo_target }}% · {{ 'met' if r.met else 'breached' }}{{ '%.2f'|format(r.achieved) if r.achieved is not none else '—' }}% · {{ r.remaining }} left
{% else %}
No monitors with an SLO target yet
{% endfor %}
{% elif t.type == 'dependencies' %}
{% for m in c.monitors %}
{% if m.last_indicator in ('none', None) and m.is_up %}{% elif m.last_indicator in ('major','critical') %}{% else %}{% endif %}{{ m.name }}{{ m.last_indicator or 'unknown' }}
{% else %}
Add a Dependency monitor (GitHub, Cloudflare, …)
{% endfor %}
{% elif t.type == 'custom_metric' %}
{{ c.server.name if c.server else '—' }} · {{ c.key }} · now {{ c.last if c.last is not none else '—' }}
{{ spark(c.points, c.max, '#f5b342', 'rgba(245,179,66,.15)') }}
{% elif t.type == 'text' %}
{{ c.body }}
{% elif t.type == 'embed' %}{% if c.url %}{% else %}
Set an https URL
{% endif %} {% elif t.type == 'clock' %}
{{ c.time }}
{{ c.date }} · {{ c.tz }}
{% elif t.type.startswith('rum_') %}{% include '_tile_rum.html' %} {% else %}
Unknown tile
{% endif %}