Skip to content

Instantly share code, notes, and snippets.

@pabluk
Created July 28, 2014 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pabluk/cc554ec9bcfe9474cbe2 to your computer and use it in GitHub Desktop.
Save pabluk/cc554ec9bcfe9474cbe2 to your computer and use it in GitHub Desktop.
Repo git to logstash
# Command draft
git log --pretty=format:'{"commit": "%H", "author": "%an <%ae>", "date": "%at", "message": "%f"}' | ~/dev/src/logstash-1.4.0/bin/logstash -e 'input { stdin { codec => json_lines } } filter { date { match => ["date", "UNIX"] } } output { elasticsearch { host => "logstash.lxc" index => "logstash" } }'
# Remove logstash index from ES
curl -XDELETE 'http://logstash.lxc:9200/logstash/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment