How to define the shard settings in the logstash output configuration?


(Bharath Pusuluri) #1

The Elasticsearch and Logstash version using is 5.2.1, where can i define the shards settings in the below elasticsearch output pattern.

elasticsearch {
    index => "yarn-apps-logs-%{+YYYY.MM}"
    document_type => "doc"
    codec => "json"
    hosts  => "XX.XX.XX.XX:9200"
    user => "xxxxx"
    password => "xxxxxx"

}


(Christian Dahlqvist) #2

You specify mappings and index setting through an index template, not the Elasticsearch output configuration (although you can get the plugin to upload the template for you).


(Bharath Pusuluri) #3

for logstash, where can i find the template.

One more thing this should apply only to my selected set of index not at the system level.


(Christian Dahlqvist) #4

You can look in Elasticsearch as the default one should be stored there. You can then take this and adapt it for your indices.


(system) #5

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