Created
July 21, 2015 15:00
-
-
Save dcode/24445ad20ad0ebb5e2e7 to your computer and use it in GitHub Desktop.
Examples on how to stream some logs from the 'current' directory through a filter. You could use grep or awk to filter to specific lines
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
# Notice tail | |
stdbuf -o0 tail -n+1 -F notice.log \ | |
| stdbuf -o0 bro-cut -d ts note msg \ | |
| awk -F'\t' '{ print "================\n" $1, $2"\n", $3 }' | |
# HTTP Tail | |
stdbuf -o0 tail -n+1 -F http.log \ | |
| stdbuf -o0 bro-cut id.orig_h uri user_agent \ | |
| awk -F'\t' '{ print "=================\n" $1, $2"\n", $3 }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment