Created
July 21, 2019 06:54
-
-
Save hackerzhut/63707beb5aef3e54791d74bd7b187252 to your computer and use it in GitHub Desktop.
Cloudwatch commands from kaihendry
This file contains hidden or 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
# Full text search | |
[hendry@t480s 5xx]$ cat bugzilla.sh | |
aws --profile uneet-dev logs filter-log-events --log-group-name bugzilla --start-time $(date -d "-1 hour" +%s000) \ | |
--filter-pattern '"apex/ping/v1.0"' | |
# (faster) Query on a JSON structured log | |
[hendry@t480s 5xx]$ cat alambda.sh | |
aws --profile uneet-demo logs filter-log-events --log-group-name "/aws/lambda/alambda_simple" --start-time $(date -d "-8 | |
hours" +%s000) \ | |
--filter-pattern '{ $.level = "error" }' | | |
jq '.events[].message|fromjson' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment