Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

mkdir pipeline

vi pipeline/logstash.conf


Code Block
titlelogstash.yml
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
titletest.json
{"message":{"someField":"someValue"}}

...