# Different index (APM) per application Cloud console or api

**URL:** <https://discuss.elastic.co/t/different-index-apm-per-application-cloud-console-or-api/247540>\
**Category:** APM\
**Tags:** ilm-index-lifecycle-management, dotnet\
**Created:** [September 4, 2020, 1:07pm UTC](https://discuss.elastic.co/t/different-index-apm-per-application-cloud-console-or-api/247540 "2020-09-04T13:07:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baklap4](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/baklap4/32/45312_2.png) [@Baklap4](https://discuss.elastic.co/u/Baklap4)\
**Post date:** [September 4, 2020, 1:07pm UTC](https://discuss.elastic.co/t/different-index-apm-per-application-cloud-console-or-api/247540/1 "2020-09-04T13:07:49Z")

</div>

**Kibana version** : 7.9.1

**Elasticsearch version** : 7.9.1

**APM Server version** : 7.9.1

**Fresh install or upgraded from other version?** : Upgraded from 7.9.0

**Is there anything special in your setup?** No

**Description of the problem** :  
I'd like to create different indices per application for apm (cloud hosted). I've been told to update the settings in the cloud console or the api.

I'd love to use this setup:

```
setup.template.name: 'apm'
setup.template.pattern: 'apm-*'
apm-server.ilm.setup.enabled: false
setup.template.settings.index.number_of_replicas: 0
output.elasticsearch:
    index: 'apm-%{[observer.version]}-%{+yyyy-MM}'
    indices:
        - index: 'apm-%{[observer.version]}-%{[kubernetes.labels.department]}-%[kubernetes.labels.app]}-%{+yyyy-MM}'
          when:
            not:
              or:
                - equals:
                    kubernetes.namespace: botkube
                - equals:
                    kubernetes.namespace: cert-manager
                - equals:
                    kubernetes.namespace: default
                - equals:
                    kubernetes.namespace: kube-node-lease
                - equals:
                    kubernetes.namespace: kube-public
                - equals:
                    kubernetes.namespace: kube-system

```

Within the UI of the cloud console this seems to work but upon trying to save i'm getting:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/f/e/fef2c986acb3a69ebc873bd1b9fe9ce86b177ec7.png)

Within heartbeat, filebeat and metricbeat we use this same configuration and that seems to do the job very well as we get different indices per application.

What i'd like to achieve is to show the correct apm-info per space within kibana so that the application specific space only has that specific apm data instead of all the apm data available.

This seems to work just fine for heartbeat, metricbeat and filebeat.

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [September 4, 2020, 1:50pm UTC](https://discuss.elastic.co/t/different-index-apm-per-application-cloud-console-or-api/247540/2 "2020-09-04T13:50:34Z")

</div>

Hi @Baklap4,  
unfortunately this is a known limitation at the moment, please see some [previous conversation](https://github.com/elastic/apm-server/issues/4025#issuecomment-667914413) around this topic. We do have an internal enhancement request for it, but it is not yet implemented.

---

<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:** [September 25, 2020, 9:50am UTC](https://discuss.elastic.co/t/different-index-apm-per-application-cloud-console-or-api/247540/3 "2020-09-25T09:50:35Z")

</div>

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