# Filebeat Apache Module Change Index Name

**URL:** <https://discuss.elastic.co/t/filebeat-apache-module-change-index-name/176955>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 15, 2019, 6:42pm UTC](https://discuss.elastic.co/t/filebeat-apache-module-change-index-name/176955 "2019-04-15T18:42:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jsoriano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsoriano/32/27920_2.png) [@jsoriano](https://discuss.elastic.co/u/jsoriano)\
**Post date:** [April 16, 2019, 8:34am UTC](https://discuss.elastic.co/t/filebeat-apache-module-change-index-name/176955/2 "2019-04-16T08:34:55Z")

</div>

Hi @Ryne_Keel,

If you want to use different indexes for different modules you can use the [`indices`](https://www.elastic.co/guide/en/beats/filebeat/7.0/elasticsearch-output.html#indices-option-es) output setting. It allows you to configure different indices depending on some condition, for example you could do something like this in your case to have a different index for apache module:

```auto
output.elasticsearch:
  hosts: ["elastic1:9200", "elastic2:9200"]
  indices:
    - index: "filebeat-%{[agent.version]}-apache-%{+yyyy.MM.dd}"
      when.equals:
        event.module: "apache"
    - default: "filebeat-%{[agent.version]}-%{+yyyy.MM.dd}"

```

Notice that here I try to keep the default prefixes, this way the defailt patterns for the index mappings (`filebeat-%{[agent.version]}-*`) and the dashboard (`filebeat-*`) should work and you wouldn't need to modify these setup settings.

---

_[View the full topic](https://discuss.elastic.co/t/filebeat-apache-module-change-index-name/176955)._
