Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork84
Fast, multi-purpose tool for AWS CloudWatch Logs
License
TylerBrock/saw
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
saw is a multi-purpose tool for AWS CloudWatch Logs
Colorized output that can be formatted in various ways
--expandExplode JSON objects using indenting--rawStringPrint JSON strings instead of escaping ("\n", ...)--invertInvert white colors to black for light color schemes--raw, or--pretty, forwatchandgetcommands respectively, toggles display of the timestamp and stream name prefix.
Filter logs using CloudWatch patterns
--filter fooFilter logs for the text "foo"
Watch aggregated interleaved streams across a log group
saw watch productionStream logs from production log groupsaw watch production --prefix apiStream logs from production log group with prefix "api"
Basic
# Get list of log groupssaw groups# Get list of streams for production log groupsaw streams production
Watch
# Watch production log groupsaw watch production# Watch production log group streams for apisaw watch production --prefix api# Watch production log group streams for api and filter for "error"saw watch production --prefix api --filter error
Get
# Get production log group for the last 2 hourssaw get production --start -2h# Get production log group for the last 2 hours and filter for "error"saw get production --start -2h --filter error# Get production log group for api between 26th June 2018 and 28th June 2018saw get production --prefix api --start 2018-06-26 --stop 2018-06-28
By default Saw uses the region and credentials in your default profile. You can override these to your liking using the command line flags:
# Use personal profilesaw groups --profile personal# Use us-west-1 regionsaw groups --region us-west-1
docker run --rm -it -v~/.aws:$HOME/.aws tbrock/saw
brew tap TylerBrock/sawbrew install saw
# Using yayyay saw# Using makepkggit clone https://aur.archlinux.org/saw.gitcd sawmakepkg -sri
rpm -i<link_to_rpm_you_need_from_releases>
wget<link_to_deb_you_need_from_releases>sudo dpkg -i<the_deb_name>
- Install go
- Configure your
GOPATHand add$GOPATH/binto your path - Run
go install github.com/TylerBrock/saw@latest
- Add %GOPATH%/bin to your path (optional)
- Run from gopath/bin (If not in your path)
cd %GOPATH%/binsaw ...
Alternatively you can hard code these in your shell's init scripts (bashrc, zshrc, etc...):
# Export profile and region that override the defaultexport AWS_PROFILE='work_profile'export AWS_REGION='us-west-1'
From root of repository:go test -v ./...
- Bash + ZSH completion of log groups + (streams?)
- Create log streams and groups
- Delete log streams and groups
- Basic tests
About
Fast, multi-purpose tool for AWS CloudWatch Logs
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors10
Uh oh!
There was an error while loading.Please reload this page.
