Easily tail logs on remote servers
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
build
script
.gitignore
README.md
logtailer.go

README.md

logtailer : multi-hosts "tail -f"

NB: this repo is in very early alpha, use at your own risks!

For instance it doesn't clean subprocesses porperly for now when hitting Ctrl+C.

Installation

Go download the correct version of the tool on the releases page.

If you better like command-line, here we go:

... for Linux 64bits users:

sudo curl -L https://github.com/botify-labs/logtailer/releases/download/0.0.2/logtailer_linux-amd64 -o /usr/local/bin/logtailer
sudo chmod +x /usr/local/bin/logtailer

... for Mac OSX users:

sudo curl -L https://github.com/botify-labs/logtailer/releases/download/0.0.2/logtailer_darwin-amd64 -o /usr/local/bin/logtailer
sudo chmod +x /usr/local/bin/logtailer

If you want to build a development version, use go run yourself:

go run logtailer.go <server(s)> <file(s)>

Usage

Generic usage:

logtrailer [-n150] <host1 [host2 host3 ...]> <file1 [file2 file3 ...]>

Given you can use shell expansion on your side, and shell globing for some patterns on remote side!

Examples:

logtrailer elasticsearch{1,2,3}.example.net "/var/log/elasticsearch/*.log"
#=> will follow all logs inside this folder for those 3 machines

logtrailer -n25 server.example.net /var/log/syslog "/var/log/**/*.log"
#=> will follow basically all logs on server.example.net

References

This is my first program in Go, so I'll leave here some articles or StackOverflow questions that helped me making this. Thanks to their respective authors!

Useful references: