Skip to content

Instantly share code, notes, and snippets.

@vpack
Created March 13, 2015 00:11
Show Gist options
  • Save vpack/e5a30f68db7be7c593ee to your computer and use it in GitHub Desktop.
Save vpack/e5a30f68db7be7c593ee to your computer and use it in GitHub Desktop.
Ingest CloudTrail files to MongoDB
for x in `find . -name "*.json.gz"` ; do zcat $x | jq .Records[] | mongoimport --collection cloudtrail --jsonArray ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment