# Multiple index pattern of same name

**URL:** https://discuss.elastic.co/t/multiple-index-pattern-of-same-name/236210
**Category:** APM
**Tags:** ui
**Created:** [June 8, 2020, 5:13pm UTC](https://discuss.elastic.co/t/multiple-index-pattern-of-same-name/236210 "2020-06-08T17:13:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)
#### Post date: [June 8, 2020, 5:13pm UTC](https://discuss.elastic.co/t/multiple-index-pattern-of-same-name/236210/1 "2020-06-08T17:13:18Z")

</div>

**Kibana version** : 7.6

**Elasticsearch version** : 7.6

**APM Server version** : 7.3.2

**APM Agent language and version** : java 1.9.0

**Fresh install or upgraded from other version?** fresh install

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. :-----No

As shown in below screen I see two apm-\* in y index pattern. This creates confusion s to which one to select when I create visualizations. What could be the reason for this ? .

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b8db0c07374743f88494a73ba64de99776aa8852.png)

Also this is my index management screen .. I did multiple upgradation and have below indices . Is that why Index pattern has multiple apm-\* ?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/2/925f8743078fcb9bf3ab94318172333e856b4808.png)

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [June 9, 2020, 5:10am UTC](https://discuss.elastic.co/t/multiple-index-pattern-of-same-name/236210/2 "2020-06-09T05:10:58Z")

</div>

Hello Anjana,

I cannot explain where this comes from but I can at least add a bit of information as I can see the same(We are also using version 7.6 but we upgraded from 6.8 so I guess my second pattern comes from the upgrade):  
When checking the apm indexes  
[https://host:5601/api/saved\_objects/\_find?type=index-pattern&fields=id&search\_fields=title&search=apm](https://host:5601/api/saved_objects/_find?type=index-pattern&fields=id&search_fields=title&search=apm)  
I see the following:

```auto
{
            "type": "index-pattern",
            "id": "apm-*",
            "references": [],
            "migrationVersion": {
                "index-pattern": "7.6.0"
            },
            "updated_at": "2020-02-21T10:14:50.733Z",
            "version": "WzExNzY0LDFd"
        }, {
            "type": "index-pattern",
            "id": "apm_static_index_pattern_id",
            "references": [],
            "migrationVersion": {
                "index-pattern": "7.6.0"
            },
            "updated_at": "2020-03-13T06:02:57.875Z",
            "version": "WzU0MjAyLDJd"
        }

```

The IDs are different and after I searched the internet I came upon this issue:

> <https://github.com/elastic/kibana/issues/52736>
>
> APM UI is hardcoded to link to Discover with the index pattern id "apm\_static\_in…dex\_pattern\_id".
> When APM UI is loaded it will automatically create the index pattern if it doesn't already exist.
> 
> If someone wants to create their own index pattern they can submit it via the API. They should just make sure to set the id as \`apm\_static\_index\_pattern\_id\`. All other fields can freely be changed:
> 
> \`\`\`js
> \[
> {
> "type": "index-pattern",
> "id": "apm\_static\_index\_pattern\_id", // Hardcoded id - this should not be changed
> "attributes": {
> "title": "apm-\*", // any matcher matching the apm indices. Can be changed freely
> "timeFieldName": "@timestamp" 
> }
> },
> ... \<further index patterns\> ...
> \]
> \`\`\`
> 
> The API for creating the index pattern is still beta afaik but would be good to document this somewhere. 
> @bmorelli25 any thoughts?

> If someone wants to create their own index pattern they can submit it via the API. They should just make sure to set the id as `apm_static_index_pattern_id` . All other fields can freely be changed:

So I guess that the pattern with ID apm\_static\_index\_pattern\_id is the correct one but I do not know where the other comes from for you.

I hope this helps a bit.

Best regards  
Wolfram

---

<div class="post-metadata">

### Author: ![dgieselaar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgieselaar/32/46947_2.png) [@dgieselaar](https://discuss.elastic.co/u/dgieselaar)
#### Post date: [June 9, 2020, 12:31pm UTC](https://discuss.elastic.co/t/multiple-index-pattern-of-same-name/236210/3 "2020-06-09T12:31:51Z")

</div>

@anjana1 @Wolfram_Haussig this is (was) a bug on our side - a fix is in for 7.8: [https://github.com/elastic/kibana/pull/64883](https://github.com/elastic/kibana/pull/64883)

---

<div class="post-metadata">

### Author: ![anjana1](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@anjana1](https://discuss.elastic.co/u/anjana1)
#### Post date: [June 24, 2020, 7:17pm UTC](https://discuss.elastic.co/t/multiple-index-pattern-of-same-name/236210/4 "2020-06-24T19:17:09Z")

</div>

Hi ,  
@dgieselaar I have upgraded to 7.8. So after I did a restore I ended Up creating an apm index . Then I imported my saved objected from previous version, which caused an extra apm-\* saved object to be imported. So since I created an apm-\* index pattern initially I ended up having two occurences of apm-\* again. But if I delete the originally created index pattern that solves the issue. But unlike you said it didn't resolve in 7.8?

---

<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 15, 2020, 3:23pm UTC](https://discuss.elastic.co/t/multiple-index-pattern-of-same-name/236210/5 "2020-07-15T15:23:11Z")

</div>

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