All Projects → TylerBrock → Saw

TylerBrock / Saw

Licence: mit
Fast, multi-purpose tool for AWS CloudWatch Logs

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Saw

Cw
The best way to tail AWS CloudWatch Logs from your terminal
Stars: ✭ 368 (-65.64%)
Mutual labels:  aws, cli, logs, tail
Zoya
Truly highly composable logging utility
Stars: ✭ 116 (-89.17%)
Mutual labels:  cli, json, logs, color
Jsonwatch
Track changes in JSON data from the command line
Stars: ✭ 130 (-87.86%)
Mutual labels:  cli, watch, json
Jl
jl — JSON Logs, a development tool for working with structured JSON logging.
Stars: ✭ 194 (-81.89%)
Mutual labels:  cli, json, logs
Jungle
AWS operations by cli should be simpler
Stars: ✭ 842 (-21.38%)
Mutual labels:  aws, cli
Html Table Cli
Create interactive tables from JSON on the command-line
Stars: ✭ 23 (-97.85%)
Mutual labels:  cli, json
Crossline
A small, self-contained, zero-config, MIT licensed, cross-platform, readline and libedit replacement.
Stars: ✭ 53 (-95.05%)
Mutual labels:  cli, color
Bashmultitool
A library for bash shell program containing useful functions. Can be imported into scripts to create colourful and functional scripts and TUIs.
Stars: ✭ 27 (-97.48%)
Mutual labels:  cli, color
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (-26.98%)
Mutual labels:  cli, color
Ecsctl
Command-line tool for managing AWS Elastic Container Service and Projects to run on it.
Stars: ✭ 15 (-98.6%)
Mutual labels:  aws, cli
Jplot
iTerm2 expvar/JSON monitoring tool
Stars: ✭ 949 (-11.39%)
Mutual labels:  cli, json
Lambdalogs
A CLI tool to trace AWS Lambda calls over multiple CloudWatch log groups.
Stars: ✭ 18 (-98.32%)
Mutual labels:  aws, cli
Kt
Kafka command line tool that likes JSON
Stars: ✭ 799 (-25.4%)
Mutual labels:  cli, json
Executor
Watch for file changes and then execute command. Very nice for test driven development.
Stars: ✭ 14 (-98.69%)
Mutual labels:  cli, watch
Bash My Aws
Bash-my-AWS provides simple but powerful CLI commands for managing AWS resources
Stars: ✭ 782 (-26.98%)
Mutual labels:  aws, cli
Nord Guake
An arctic, north-bluish clean and elegant Guake color theme.
Stars: ✭ 20 (-98.13%)
Mutual labels:  cli, color
Pretty Print Json
🦋 Pretty-print JSON data into HTML to indent and colorize (written in TypeScript)
Stars: ✭ 41 (-96.17%)
Mutual labels:  json, color
Terraform Nextjs Plugin
A plugin to generate terraform configuration for Nextjs 8 and 9
Stars: ✭ 41 (-96.17%)
Mutual labels:  aws, cli
Fliplog
fluent logging with verbose insight, colors, tables, emoji, filtering, spinners, progress bars, timestamps, capturing, stack traces, tracking, presets, & more...
Stars: ✭ 41 (-96.17%)
Mutual labels:  cli, color
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (-95.24%)
Mutual labels:  aws, logs

Saw

saw is a multi-purpose tool for AWS CloudWatch Logs

Saw Gif

Go Report Card

Run from Docker

docker run --rm -it -v ~/.aws:$HOME/.aws tbrock/saw

Installation

Mac OS X

brew tap TylerBrock/saw
brew install saw

Linux

Arch Linux (source)

# Using pacaur
pacaur -S saw

# Using trizen
trizen -S saw

# Using yaourt
yaourt -S saw

# Using makepkg
git clone https://aur.archlinux.org/saw.git
cd saw
makepkg -sri

Red Hat Based Distributions (Fedora/RHEL/CentOS/Amazon Linux)

rpm -i <link_to_rpm_you_need_from_releases>

Debian Based Distributions (Debian/Ubuntu)

wget <link_to_deb_you_need_from_releases>
sudo dpkg -i <the_deb_name>

Manual Install/Update

  • Install go
  • Configure your GOPATH and add $GOPATH/bin to your path
  • Run go get -u github.com/TylerBrock/saw

Windows Specifics

  • Add %GOPATH%/bin to your path (optional)
  • Run from gopath/bin (If not in your path)
    cd %GOPATH%/bin
    saw ...
    

Usage

  • Basic

    # Get list of log groups
    saw groups
    
    # Get list of streams for production log group
    saw streams production
    
  • Watch

    # Watch production log group
    saw watch production
    
    # Watch production log group streams for api
    saw 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 hours
    saw 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 2018
    saw get production --prefix api --start 2018-06-26 --stop 2018-06-28
    

Features

  • Colorized output that can be formatted in various ways

    • --expand Explode JSON objects using indenting
    • --rawString Print JSON strings instead of escaping ("\n", ...)
    • --invert Invert white colors to black for light color schemes
    • --raw, or --pretty, for watch and get commands respectively, toggles display of the timestamp and stream name prefix.
  • Filter logs using CloudWatch patterns

    • --filter foo Filter logs for the text "foo"
  • Watch aggregated interleaved streams across a log group

    • saw watch production Stream logs from production log group
    • saw watch production --prefix api Stream logs from production log group with prefix "api"

Profile and Region Support

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 profile
saw groups --profile personal

# Use us-west-1 region
saw groups --region us-west-1

Alternatively you can hard code these in your shell's init scripts (bashrc, zshrc, etc...):

# Export profile and region that override the default
export AWS_PROFILE='work_profile'
export AWS_REGION='us-west-1'

Run Tests

From root of repository: go test -v ./...

TODO

  • Bash + ZSH completion of log groups + (streams?)
  • Create log streams and groups
  • Delete log streams and groups
  • Basic tests
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].