diff --git a/logstash/Dockerfile b/logstash/Dockerfile index 5419695..920e1ae 100644 --- a/logstash/Dockerfile +++ b/logstash/Dockerfile @@ -1 +1,4 @@ -FROM logstash:latest \ No newline at end of file +FROM logstash:latest + +# Install plugins +RUN logstash-plugin install logstash-filter-json \ No newline at end of file diff --git a/logstash/config/logstash.conf b/logstash/config/logstash.conf index 5718b33..72ac623 100644 --- a/logstash/config/logstash.conf +++ b/logstash/config/logstash.conf @@ -6,6 +6,13 @@ input { ## Add your filters here +# Added a default json filter for parsing the "message" field +filter { + json { + source => "message" + } +} + output { elasticsearch { hosts => "elasticsearch:9200"