Skip to content

Instantly share code, notes, and snippets.

@fbettag
Created May 23, 2018 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fbettag/ca261454aea1db7b42617f5a0b573a18 to your computer and use it in GitHub Desktop.
Save fbettag/ca261454aea1db7b42617f5a0b573a18 to your computer and use it in GitHub Desktop.
#!/bin/sh
LINES=150
LOG=/logs/everything.log
IGNORE="'U7PG2|cron|no matching key|[Ii]nvalid user|preauth|Timeout before auth|service=retention|-- MARK --|Log statistics|ntpd|tsm1|last message repeated'"
CURLOG="egrep -ve $IGNORE $LOG | tail -n $LINES"
NOWLOG="tail -Fn 0 $LOG | egrep -ve $IGNORE"
ssh tail@data "$CURLOG && $NOWLOG" | ccze -A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment