ssh_log_tail
Read the last lines of log files over SSH, even huge ones. Supports multiple paths and globs, 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. Globs are expanded by the server's find rather than a shell, so a name holding a space or a newline stays one path. To look for something instead of reading the end, use ssh_log_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 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. |