# How to configure indexes in logstash

**URL:** <https://discuss.elastic.co/t/how-to-configure-indexes-in-logstash/182792>\
**Category:** Elasticsearch\
**Created:** [May 26, 2019, 9:49am UTC](https://discuss.elastic.co/t/how-to-configure-indexes-in-logstash/182792 "2019-05-26T09:49:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swaroop\_Chand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/swaroop_chand/32/45812_2.png) [@Swaroop\_Chand](https://discuss.elastic.co/u/Swaroop_Chand)\
**Post date:** [May 26, 2019, 9:49am UTC](https://discuss.elastic.co/t/how-to-configure-indexes-in-logstash/182792/1 "2019-05-26T09:49:35Z")

</div>

input {  
beats {  
port =\> 5044  
}  
}

filter {  
if [type] == "syslog" {  
grok {  
match =\> { "message" =\> "%{SYSLOGTIMESTAMP:syslog\_timestamp} %{SYSLOGHOST:syslog\_hostname} %{DATA:syslog\_program}(?:[%{POSINT:syslog\_pid}])?: %{GREEDYDATA:syslog\_message}" }  
}  
date {  
match =\> ["syslog\_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss"]  
}  
}  
}  
output {  
elasticsearch {  
hosts =\> ["[https://localhost:9200](https://localhost:9200/)"]  
index =\> "%{[@metadata][beat]}-%{+YYYY.MM.dd}"  
document\_type =\> "%{[@metadata][type]}"  
}  
}

## After running "service logstash start" new index is not created. Please Help.

[http://localhost:9200/\_cat/indices](http://localhost:9200/_cat/indices)  
yellow open logstash-2019.05.25 CbucJMQMROK8MrZq6BEQiw 1 1 15 0 5kb 5kb  
green open .kibana\_1 ncR\_HLCTTWKEynV38Jbayw 1 0 7 1 167.3kb 167.3kb

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 26, 2019, 10:09am UTC](https://discuss.elastic.co/t/how-to-configure-indexes-in-logstash/182792/2 "2019-05-26T10:09:21Z")

</div>

What if you do not specify document type? Do you have Elasticsearch secured as you are specifying https? If so, please provide some details.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 23, 2019, 10:09am UTC](https://discuss.elastic.co/t/how-to-configure-indexes-in-logstash/182792/3 "2019-06-23T10:09:26Z")

</div>

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