# Dynamic filebeat index naming

**URL:** <https://discuss.elastic.co/t/dynamic-filebeat-index-naming/238387>\
**Category:** Beats\
**Tags:** beats-module, filebeat\
**Created:** [June 24, 2020, 6:06am UTC](https://discuss.elastic.co/t/dynamic-filebeat-index-naming/238387 "2020-06-24T06:06:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ajhstn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ajhstn/32/24629_2.png) [@ajhstn](https://discuss.elastic.co/u/ajhstn)\
**Post date:** [June 24, 2020, 6:06am UTC](https://discuss.elastic.co/t/dynamic-filebeat-index-naming/238387/1 "2020-06-24T06:06:38Z")

</div>

Hi - I am using the new(er) Okta and PANW filebeat modules.

How do i say " **send the okta logs to the okta index and the panw logs to the panw index**"

I have tried this to create an index based of the `fields.event.module` field.

```auto
output.elasticsearch:
 index: "%{[fields.event.module]:other}-%{[agent.version]}-%{+yyyy.MM.dd}"

setup.template.name: "index-%{[beat.version]}"
setup.template.pattern: "index-%{[beat.version]}-*"

```

---

<div class="post-metadata">

**Author:** ![mtojek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mtojek/32/63863_2.png) [@mtojek](https://discuss.elastic.co/u/mtojek)\
**Post date:** [June 24, 2020, 9:04am UTC](https://discuss.elastic.co/t/dynamic-filebeat-index-naming/238387/2 "2020-06-24T09:04:26Z")

</div>

I'm not quite sure if I understand your problem. Did you run filebeat setup?

---

<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:** [July 22, 2020, 11:04am UTC](https://discuss.elastic.co/t/dynamic-filebeat-index-naming/238387/3 "2020-07-22T11:04:41Z")

</div>

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