{# docker/service.html — one swarm service (#5302, #5310): a header that says whether it is well and what it runs; its last failure only while it is in trouble; its CPU and memory over time; one table of its tasks, the running ones first with what they use; and the logs of every task it has run. A failure's "Logs →" lands on #logs with ?task= picked. #} {% extends "base.html" %} {% from "_macros.html" import crumbs, status_badge %} {% from "docker/_usage.html" import cpu, mem %} {% block title %}{{ name }} — Docker — Steward{% endblock %} {% block breadcrumb %}{{ crumbs([("Docker", "/plugins/docker/"), (name, "")]) }}{% endblock %} {% block content %} {% if service is none %}
{{ name }} is reported now; it may have been removed.
The logs Steward still keeps from its tasks are below.
{% else %}
No swarm service named {{ name }} is reported, and Steward holds no logs or
events for one. It may have been removed. Back to Docker
{% endif %}
{% if row.crash_looping %}{{ status_badge('crit', 'Crash-looping') }} {% elif row.state == 'down' %}{{ status_badge('crit', 'Down') }} {% elif row.state == 'degraded' %}{{ status_badge('warn', 'Degraded') }} {% else %}{{ status_badge('ok', 'Healthy') }}{% endif %} {{ row.running }} of {{ row.desired }} running {%- if troubled and row.trouble_since %} · in trouble since {{ row.trouble_since|ago }}{% endif %} · {{ row.mode }} {%- if stack %} · stack {{ stack }}{% endif %} {%- if image %} · {{ image.split("@")[0] }}{% endif %}
{% if (not troubled and e) or svc %}{%- if not troubled and e %}Last failed {% if e.age_s is not none %}{{ e.age_s|duration }} ago{% endif %} {%- if e.exit_code %} (exit {{ e.exit_code }}){% endif %} {%- if e.task_id %} · its logs{% endif %} · {% endif -%} {%- if svc %}reported {{ svc.updated_at|ago }} by the manager's agent{% endif -%}
{% endif %}{{ e.error or e.message or e.state }}{% if e.exit_code %} (exit {{ e.exit_code }}){% endif %} {%- if e.node %} · on {{ e.node }}{% endif %}{% if e.age_s is not none %} · {{ e.age_s|duration }} ago{% endif %} {%- if e.task_id %} · its logs →{% endif %}
Loading…
| Slot | Task | Node | State | CPU | Memory | Exit | Why | When |
|---|---|---|---|---|---|---|---|---|
| {{ t.slot or "—" }} | {%- if t.task_id %}{{ t.task_id[:10] }} {%- if t.container and t.host_id %} ↗{% endif %} {%- elif t.container and t.host_id %}{{ t.container|truncate(24, true, "…") }} {%- else %}—{% endif -%} | {% if t.host_id %}{{ t.node }}{% else %}{{ t.node }}{% endif %} | {%- if t.failed %}{{ status_badge('crit', t.state|capitalize) }} {%- elif t.current %}{{ status_badge('ok', 'Running') }} {%- else %}{{ t.state }}{% endif %} {%- if t.health == 'unhealthy' %} {{ status_badge('crit', 'Unhealthy') }}{% elif t.health == 'starting' %} {{ status_badge('pending', 'Starting') }}{% endif %} {%- if t.desired and t.desired != t.state and not t.current %} → {{ t.desired }}{% endif -%} | {% if t.usage %}{{ cpu(t.usage) }}{% else %}—{% endif %} | {% if t.usage %}{{ mem(t.usage) }}{% else %}—{% endif %} | {% if t.exit_code %}{{ t.exit_code }}{% else %}—{% endif %} | {{ t.why or "" }} | {% if t.at %}{{ t.at|ago }}{% else %}—{% endif %} |
No task is running, and Swarm's record of its tasks has not been reported yet (the manager's agent reports it from version 1.8.0).
{% endif %}Loading…