File output not ordered with -w 1

Hello, I have a logstash configuration

input{
elasticsearch {
        hosts=> [ "SERVERHOST"]
        index => "logstash-syslog-2016.12.01"
         query => '{"filter" : {
                    "term" : { "host.raw" : "HOST" }

        }}'
    }

}

output {
   file{
         path => "/etc/elk/logout/FILE.log"
        }


}

The problem I have is with the file output, it is not ordered, I decreased the amount of workers to 1, but even with this the data appears not ordered in the file. (in ES is ordered)

You need to add a sort section to the query - https://www.elastic.co/guide/en/elasticsearch/reference/5.1/search-request-sort.html

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.