Remote multiplex server tailing & command execution runner
brew tap chonthu/tap
brew install rtail
go get github.com/chonthu/rtail
go install
rtail will stream the log down locally from the remote client, by default the command your running is tail -f
rtail [email protected]:/var/log/httpd/error_log
You can run any command you want by using a '%' istead of ':' in the rtail parameter
rtail "[email protected]%cat /var/log/mail.log"
Pass as many server as you would like
rtail [email protected]:/var/log/httpd/error_log [email protected]:/var/log/httpd/access_log
rtail "root@webserver[1-5].myserver.com:/var/log/httpd/error_log"
create a rtail.yml file in your working directory or in your home folder
or use the built in shortcut rtail init
---
aliases:
error_log: /var/log/httpd/error_log
commands:
varnish: varnishlog
Now you can run these custom command like so:
rtail myserver.web1:error_log
rtail myserver.web2%varnish