Here are the requested files (with some minor changes after some tests). Thanks in advance!
# LOGS
14/11/2018 10:39:31Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
14/11/2018 10:39:31[2018-11-14T12:39:31,555][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.queue", :path=>"/usr/share/logstash/data/queue"}
14/11/2018 10:39:31[2018-11-14T12:39:31,569][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.dead_letter_queue", :path=>"/usr/share/logstash/data/dead_letter_queue"}
14/11/2018 10:39:32[2018-11-14T12:39:32,331][INFO ][logstash.agent ] No persistent UUID file found. Generating new UUID {:uuid=>"923f9031-1cb4-4a69-b3a6-3c3b67b05459", :path=>"/usr/share/logstash/data/uuid"}
14/11/2018 10:39:33[2018-11-14T12:39:33,414][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.4.2"}
14/11/2018 10:39:40[2018-11-14T12:39:40,750][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
14/11/2018 10:39:41[2018-11-14T12:39:41,716][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[<MY_ELASTIC_SEARCH_HOST_WHICH_IS_CORRECT_IN_THE_LOG>]}}
14/11/2018 10:39:41[2018-11-14T12:39:41,747][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=><MY_ELASTIC_SEARCH_HOST_WHICH_IS_CORRECT_IN_THE_LOG>, :path=>"/"}
14/11/2018 10:39:42[2018-11-14T12:39:42,929][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"<MY_ELASTIC_SEARCH_HOST_WHICH_IS_CORRECT_IN_THE_LOG>"}
14/11/2018 10:39:43[2018-11-14T12:39:43,600][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
14/11/2018 10:39:43[2018-11-14T12:39:43,605][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>6}
14/11/2018 10:39:43[2018-11-14T12:39:43,648][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["<MY_ELASTIC_SEARCH_HOST_WHICH_IS_CORRECT_IN_THE_LOG>"]}
14/11/2018 10:39:43[2018-11-14T12:39:43,711][INFO ][logstash.outputs.elasticsearch] Using mapping template from {:path=>nil}
14/11/2018 10:39:43[2018-11-14T12:39:43,790][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-*", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"_default_"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"*", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
14/11/2018 10:39:44[2018-11-14T12:39:44,320][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x174dd0bd run>"}
14/11/2018 10:39:44[2018-11-14T12:39:44,377][INFO ][logstash.inputs.http ] Starting http input listener {:address=>"127.0.0.1:5000", :ssl=>"false"}
14/11/2018 10:39:44[2018-11-14T12:39:44,412][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
14/11/2018 10:39:44[2018-11-14T12:39:44,958][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
# logstash.yml
http.host: "127.0.0.1"
http.port: 9600
# Dockerfile
FROM docker.elastic.co/logstash/logstash:6.4.2
RUN rm -f /usr/share/logstash/pipeline/logstash.conf
COPY logstash.conf /usr/share/logstash/pipeline/logstash.conf
RUN rm -f /usr/share/logstash/config/logstash.yml
COPY logstash.yml /usr/share/logstash/config/logstash.yml
EXPOSE 5000 9600
# logstash.conf (simplified without the "filter" section)
input {
http {
host => "127.0.0.1"
port => 5000
}
}
output {
elasticsearch {
hosts => "${ELASTIC_SEARCH_HOST}"
user => "${ELASTIC_SEARCH_USER}"
password => "${ELASTIC_SEARCH_PASSWORD}"
index => "${ELASTIC_SEARCH_INDEX}"
}
}