Index pattern from Logstash

#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
  #_source.enabled: false
setup.template.name: "metricbeat"
setup.template.pattern: "metricbeat-*"
setup.dashboards.index: "metricbeat-*"

Like we have index setup template pattern in metricbeat, Can we also create such index pattern from logstash?

Below is my logstash output configuration
output {

  elasticsearch {
    hosts => "localhost:9200"
    index => "%{[fields][log-type]}-%{[host][name]}-%{+YYYY.MM.dd}"
  }

}

How do I create index pattern?

My intention is I don't want to create index from Kibana UI. Instead I need to create an index pattern like {[fields][log-type]}-* which would avoid me creating index pattern in Kibana UI?

Could please update me how to create index pattern from logstash?

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