Skip to content

Instantly share code, notes, and snippets.

@jonathanhle
Created October 20, 2015 16:45
Show Gist options
  • Save jonathanhle/4917f6a7cdfb3c5493f3 to your computer and use it in GitHub Desktop.
Save jonathanhle/4917f6a7cdfb3c5493f3 to your computer and use it in GitHub Desktop.
Cheaply AWKing the AWS elb logs at the command line
cat *elasticloadbalancing*.log | awk '{print $4 " " $8 " " $9 " " $1 " " $2 " " $3 " " $5 " " $6 " " $7 " " substr($0, index($0,$11))}' | awk '$2 != "200"' | awk '$2 != "204"' | awk '$2 != "302"' | awk '$2 != "304"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment