# Change the index from winglogbeat to metricbeat

**URL:** https://discuss.elastic.co/t/change-the-index-from-winglogbeat-to-metricbeat/277988
**Category:** Logstash
**Created:** [July 6, 2021, 6:03pm UTC](https://discuss.elastic.co/t/change-the-index-from-winglogbeat-to-metricbeat/277988 "2021-07-06T18:03:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Angelo\_Bryan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/angelo_bryan/32/91253_2.png) [@Angelo\_Bryan](https://discuss.elastic.co/u/Angelo_Bryan)
#### Post date: [July 6, 2021, 6:03pm UTC](https://discuss.elastic.co/t/change-the-index-from-winglogbeat-to-metricbeat/277988/1 "2021-07-06T18:03:47Z")

</div>

Hello elastic group, I have a question, I am trying to change the index from winglogbeat to metricbeat making the following configuration in the logstash (conf.d), but it has not worked for me, I would like to have your support.

```auto
output {
  if [agent][type] == "winlogbeat" {
        elasticsearch {
    hosts => ["https://URL-ELASTIC:9243"]
    index => "metricbeat-%{[@metadata][version]}-%{+YYYY.MM}"
    user => "elastic"
    password => "PASSWORD-ELASTIC"
  }
}
  else {
  elasticsearch {
    hosts => ["https://URL-ELASTIC:9243"]
    index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM}"
    user => "elastic"
    password => "PASSWORD-ELASTIC"
  }
}
}

```

---

<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: [August 3, 2021, 6:04pm UTC](https://discuss.elastic.co/t/change-the-index-from-winglogbeat-to-metricbeat/277988/2 "2021-08-03T18:04:33Z")

</div>

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