...
mkdir pipeline
vi pipeline/logstash.conf
Code Block | ||
---|---|---|
| ||
input { tcp { port => 5400 codec => json } http { id => "http" port => 3000 } } output { stdout { codec => rubydebug } elasticsearch { hosts => "elasticsearch:9200" user => elastic password => changeme } } |
...
We will use the logstash TCP plugin to push JSON data into elasticsearch.
vi test.json
Code Block | ||
---|---|---|
| ||
{"message":{"someField":"someValue"}} |
...