# Trouble with ilm policy when using logstash

**URL:** <https://discuss.elastic.co/t/trouble-with-ilm-policy-when-using-logstash/200894>\
**Category:** Logstash\
**Tags:** ilm-index-lifecycle-management\
**Created:** [September 24, 2019, 2:44pm UTC](https://discuss.elastic.co/t/trouble-with-ilm-policy-when-using-logstash/200894 "2019-09-24T14:44:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rjette](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rjette](https://discuss.elastic.co/u/rjette)\
**Post date:** [September 24, 2019, 2:44pm UTC](https://discuss.elastic.co/t/trouble-with-ilm-policy-when-using-logstash/200894/1 "2019-09-24T14:44:54Z")

</div>

Good morning,

I've been using several beats with elasticsearch and kibana for a while. Everything works well. When I attempt to use logstash things no longer work as expected.

As a test I setup winlog beat on a machine with the following configuration:

winlogbeat.event\_logs:

- name: Application

- name: System

- name: Security  
processors:

- name: Microsoft-Windows-Sysmon/Operational  
processors:

output.logstash:  
hosts: ["10.1.6.252:5044"]

I added the winlogbeat beat template to ES using the following:  
.\winlogbeat.exe setup --index-management -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["[es-0.mydomain.com](http://es-0.mydomain.com)"]'

This creates the template and appears to setup ilm. It creates the index:  
winlogbeat-7.3.2-2019.09.24-000001

This is the index I would like to use. When I start winlogbeat it creates an index  
logstash-2019.09.24-000001

The folloiwng is my logstash output config:

output {  
elasticsearch {  
hosts =\> ["[http://es-0.mydomain.com](http://es-0.mydomain.com)"]  
}  
}

To attempt to solve the problem I added the following to the config:

index =\> "%[@metadata][beat]}-%{[@metadata][version]}"-%{+YYYY.MM.dd}"

That also did not work. Now it creates a winlogbeat index per day and does not appear to use ilm. What am I missing?

How can I get winlogbeat and logstash to use the correct index with iml? Thanks in advance,

Ray Jette

---

<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:** [October 22, 2019, 3:19pm UTC](https://discuss.elastic.co/t/trouble-with-ilm-policy-when-using-logstash/200894/3 "2019-10-22T15:19:18Z")

</div>

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