lnav
lnav copied to clipboard
Remote docker logs
Is your feature request related to a problem? Please describe. I manage containers on many servers, wich often don't have lnav / the right version of lnav. The docker URL seems very handy, but I whish there was a way to use it remotely.
Describe the solution you'd like
lnav user@server:docker://container
How do you envision this working? Would lnav ssh to the remote host and run docker logs?
At the moment, I'm using this:
ssh user@server "docker exec -i containername tail -n +0 -F /path/to/log" | lnav
It works, but has two problems:
- in some cases, like scrolling up after the begining of the file, it stops and sends an exit message
ⓘ info: 500KB of data from stdin was captured and will be saved for one day. You can reopen it by running: lnav piper://etc - I need to remember the command / save it somewhere (from what i understood i could just create a custom URL...)
ssh user@server ...
I think you need to pass -n to ssh so that it doesn't listen to stdin, which can mess things up (see #531).