Created
May 23, 2018 10:02
-
-
Save fbettag/ca261454aea1db7b42617f5a0b573a18 to your computer and use it in GitHub Desktop.
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
#!/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