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

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"


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).

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.

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

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