Logstash Elasticsearch Input

I'm trying to extract (or) export logs from Elasticsearch via Logstash
I would like to write the extracted logs to a file

input {
  elasticsearch {
    hosts => "elasticsearch.domain.com:9200"
    query => '{ "size": 5, "query": { "match": { "host.ip": "10.1.1.1"} } }'
    size => 5
    user => "<username>"
    password => "<password>"
    scroll => "1m"
    ca_file => "/etc/logstash/certs/ca.crt"
    ssl => true
    index => "winlogbeat-7.10*"
   }
}
output {
  file {
    path => "/var/log/logstash/search-output.txt"
    codec => line
   }
}

Below is the output from the pipeline execution

After the execution, I don't see the log-extracted written into a log file

Please do not post pictures of text. They are hard to read (and some folks will be unable to read them at all) and impossible to search. Just post the text. If the text is too big post a link to a gist on github or similar text sharing site.

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