ssh_log_tail
Fetch log file tails over SSH, reading by path or container name, with optional sudo for restricted files.
Instructions
Returns the last lines of one or more log files, whatever their size — nothing is shipped here to be trimmed locally. A container is read by name instead of by path, through the file its driver writes. To look for something rather than read the end, use ssh_log_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | One path, a list, or a glob in the file name: "/var/log/*.log". Expanded by the server's find, not a shell — a name with a space or a newline stays one name. A glob in the directory part is refused. | |
| sudo | No | Read as root. Straight away for places a plain user cannot read (/root, /var/lib/docker); otherwise retry with true when the answer names what it could not read. Default: false | |
| lines | No | How many lines from the end. Default: 100 | |
| profile | Yes | Machine name. | |
| container | No | Read this container's output instead of a file: docker is asked where it writes, and the answer names the file it read. Whatever cannot be read this way — a driver that keeps no file, an engine that is not docker, a name nothing answers to — comes back said aloud, naming ssh_exec as the way through. The file belongs to root, so sudo: true. Give this or path, never both. |