Skip to content

yencarnacion/logstash-json-to-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Step 01:
  - Remove all newlines from json so as to leave one line
  - See http://stackoverflow.com/questions/1251999/how-can-i-replace-a-newline-n-using-sed
   $ cat input.json | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g' > output01.json

Step 02:
  - Load single line json file into elasticsearch with logstash 
  - Remember to '$ unset JAVA_OPTS'
  - Remember to delete ~/.sincedb_* if not working
   $  ~/bin/logstash/bin/logstash  agent -f step02.conf 

About

logstash script to load a JSON array into elasticsearch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published