Created
August 30, 2018 17:23
-
-
Save carlosolmos/0fb6fb5ae0b2a9074a5fa87c9428843a to your computer and use it in GitHub Desktop.
[Parse AWS Logs] example of how to parse aws cloudwatch logs
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
#Requirements: | |
# aws cli | |
# jq | |
aws logs get-log-events --log-group-name LOGGROUP --log-stream-name STREAMID \ | |
--limit 100 | jq '.events | .[] | .message' | \ | |
awk '{printf "%s:%s\t->\t%s:%s\n", $4, $6, $5, $7}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment