Skip to content

feat(ui): show the log of an agent at a level - #177

Merged
ingvarch merged 2 commits into
mainfrom
feat/agent-logs
Nov 4, 2026
Merged

ingvarch merged 2 commits into
mainfrom
feat/agent-logs

Conversation

@ingvarch

@ingvarch ingvarch commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

What changes

urga shows what a Nomad agent logs, at a level, following new lines: the agent urga talks to with :agentlogs (alias :monitor), and any client or server with ctrl-l on its list or its screen. Debugging a cluster no longer needs a shell on the machine.

  • The screen is the task log screen's text model, so follow, wrap, /, f, n, w and ctrl-s work as on a task log. v steps through the levels (info, debug, trace, error, warn) and opens the stream again at the new one; the title names the level.
  • The past comes first where the cluster keeps it: the last MiB of the agent's log file through MonitorExport (Nomad 1.10.4), filtered to the level, then the live lines from Monitor. An older cluster, an agent without log_file or a refused export gives no past and no error. A server named through the cluster is not asked for its past, because Nomad answers that export with a live monitor that never ends.
  • ctrl-l on servers shows only when urga talks to a server agent: a client agent ignores the server it is asked about and would answer with its own log.
  • A live log that breaks shows its error on the status line, and a past read that breaks partway shows no past, every time. The first fix also makes a closed log stream check its error once before it ends, which task logs share.
  • Streams are closed when the screen is left or the level changes. A token without agent:read sees the cluster's refusal.
  • README, docs/clients.md and docs/keys.md say this.

Left for later: file streams can still lose their error the same way (older than this branch, #176).

Closes #155

Checklist

  • The test for this change was written first and failed
  • make check is green
  • The title is a conventional commit: feat(ui): ..., fix(nomad): ...

@ingvarch ingvarch added this to the v0.17.0 milestone Nov 4, 2026
@ingvarch ingvarch added enhancement New feature or request ui Screens, keys and the header nomad The client of the Nomad API and what it reads logs Logs, files and the streams that read them labels Nov 4, 2026
@ingvarch
ingvarch merged commit 80015d1 into main Nov 4, 2026
5 checks passed
@ingvarch
ingvarch deleted the feat/agent-logs branch November 4, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request logs Logs, files and the streams that read them nomad The client of the Nomad API and what it reads ui Screens, keys and the header

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent logs at a level, with the past

1 participant