Guest User

Untitled

a guest
May 27th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. LINES=150
  4. LOG=/logs/everything.log
  5. IGNORE="'U7PG2|cron|no matching key|[Ii]nvalid user|preauth|Timeout before auth|service=retention|-- MARK --|Log statistics|ntpd|tsm1|last message repeated'"
  6.  
  7. CURLOG="egrep -ve $IGNORE $LOG | tail -n $LINES"
  8. NOWLOG="tail -Fn 0 $LOG | egrep -ve $IGNORE"
  9.  
  10. ssh tail@data "$CURLOG && $NOWLOG" | ccze -A
Add Comment
Please, Sign In to add comment