# Custom Index for Functionbeat

**URL:** <https://discuss.elastic.co/t/custom-index-for-functionbeat/248664>\
**Category:** Beats\
**Tags:** functionbeat\
**Created:** [September 15, 2020, 11:22am UTC](https://discuss.elastic.co/t/custom-index-for-functionbeat/248664 "2020-09-15T11:22:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sainath](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@sainath](https://discuss.elastic.co/u/sainath)\
**Post date:** [September 15, 2020, 11:22am UTC](https://discuss.elastic.co/t/custom-index-for-functionbeat/248664/1 "2020-09-15T11:22:01Z")

</div>

Hi Team, I am trying to deploy function beat to read AWS logs which i am succesfully able to do.

However, i require different index to be created in Elasticsearch for different log groups.Below id the elasticsearch output condition i used, which isnt working.

```
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["10.10.10.10:9200"]
  indices:
    - index: "xyz"
      when.contains:
      log_group: "ec2"

```

I also tried providing the full log groups name under the log\_group.  
Elastic search version : 7.7.1  
Functionbeat version : 7.9.0  
Please help me to understand and resolve the issue.

---

<div class="post-metadata">

**Author:** ![sainath](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@sainath](https://discuss.elastic.co/u/sainath)\
**Post date:** [September 16, 2020, 8:40am UTC](https://discuss.elastic.co/t/custom-index-for-functionbeat/248664/2 "2020-09-16T08:40:05Z")

</div>

Team, Is there anything i can try? I'd really appreciate any guidance. Thanks!

---

<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:** [September 16, 2020, 10:07am UTC](https://discuss.elastic.co/t/custom-index-for-functionbeat/248664/3 "2020-09-16T10:07:41Z")

</div>

Here is a similar thread: [Handling multiples modules output to multiples indexes, good practice?](https://discuss.elastic.co/t/handling-multiples-modules-output-to-multiples-indexes-good-practice/184085/2)

---

<div class="post-metadata">

**Author:** ![sainath](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@sainath](https://discuss.elastic.co/u/sainath)\
**Post date:** [October 14, 2020, 11:37am UTC](https://discuss.elastic.co/t/custom-index-for-functionbeat/248664/4 "2020-10-14T11:37:23Z")

</div>

Able to create new index by using below configuration on top of output.elasticsearch in functionbeat.yml

setup.ilm.enabled: false  
setup.template.name: "xyz"  
setup.template.pattern: "xyz-\*"  
output.elasticsearch:

---

<div class="post-metadata">

**Author:** ![Arzu\_Atalik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arzu_atalik/32/77531_2.png) [@Arzu\_Atalik](https://discuss.elastic.co/u/Arzu_Atalik)\
**Post date:** [October 28, 2020, 1:12pm UTC](https://discuss.elastic.co/t/custom-index-for-functionbeat/248664/5 "2020-10-28T13:12:24Z")

</div>

Egsyefsi 5wvuxtsy7wfehd7sfshfsydgxhs6svcbysicjdhufushdufhshfsfshd8chfgdjxydhjehdfeu

Fyzvdusgfyzhdns7r  
Sfhd5sgddgdydyýd  
Dyehdhdudud dudduat

---

<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:** [November 25, 2020, 3:12pm UTC](https://discuss.elastic.co/t/custom-index-for-functionbeat/248664/6 "2020-11-25T15:12:41Z")

</div>

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