Journal Unit¶
journal-unit shows the most recent journalctl logs for a systemd unit. It is
one of the bundled functions you can use from a
button as it is.
- Runs:
journalctl -u {{.unit}} -n {{.lines}} --no-pager unit(required): unit name, for examplenginx.servicelines(optional, default50): how many lines to show
The function file
Add a button¶
Read recent logs of one service
lines is numeric, so it does not need quotes. Leave it out to use the default
value 50.
Use the default line count
Related¶
- Placeholders — how
{{.unit}}is filled in - Custom functions — all five bundled examples