-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nithin Meppurathu
committed
Aug 11, 2016
1 parent
c7297cc
commit 995ac57
Showing
3 changed files
with
94 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
alliases: | ||
error_log: /var/log/httpd/error_log | ||
commands: | ||
varnish: varnishlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,49 @@ | ||
#Rtail | ||
Remote tail logging | ||
Rtail | ||
=============================== | ||
Remote multiplex server tailing & command execution runner | ||
|
||
## OSX Install with Homebrew | ||
## Install | ||
|
||
### OSX Install with Homebrew | ||
|
||
brew install https://raw.githubusercontent.com/chonthu/rtail/master/rtail.rb | ||
|
||
## Use it just as you would regular tail locally | ||
### From source | ||
|
||
go get github.com/chonthu/rtail | ||
go install | ||
|
||
## Usage | ||
|
||
### Use it just as you would regular tail locally | ||
rtail will stream the log down locally from the remote client, by default the command your running is tail -f | ||
|
||
rtail ec2-user@webserver1.myserver.com:/var/log/httpd/error_log | ||
|
||
rtail -f ec2-user@webserver1.myserver.com:/var/log/httpd/error_log | ||
You can run any command you want by using a '%' istead of ':' in the rtail parameter | ||
|
||
## Follow tag works | ||
rtail will stream the log down locally from the remote client | ||
rtail "ec2-user@webserver1.myserver.com%cat /var/log/mail.log" | ||
|
||
## Works with multiple servers! | ||
### Works with multiple servers! | ||
Pass as many server as you would like | ||
|
||
rtail -f ec2-user@webserver1.myserver.com:/var/log/httpd/error_log johndoe@webserver2.myserver.com:/var/log/httpd/access_log | ||
rtail ec2-user@webserver1.myserver.com:/var/log/httpd/error_log johndoe@webserver2.myserver.com:/var/log/httpd/access_log | ||
|
||
### Allows custom range selector | ||
|
||
rtail "root@webserver[1-5].myserver.com:/var/log/httpd/error_log" | ||
|
||
### Custom alliases & commands | ||
create a rtail.yml fil ein your working directory or in your home folder | ||
|
||
--- | ||
alliases: | ||
error_log: /var/log/httpd/error_log | ||
|
||
commands: | ||
varnish: varnishlog | ||
|
||
## Allows custom range selector | ||
Now you can run these custom command like so: | ||
|
||
rtail -f root@webserver[1-5].myserver.com:/var/log/httpd/error_log | ||
rtail myserver.web1:error_log | ||
rtail myserver.web2%varnish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters