# Index name must be lowercase after upgrade to 7.9.2

**URL:** <https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433>\
**Category:** APM\
**Tags:** server\
**Created:** [October 8, 2020, 11:57am UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433 "2020-10-08T11:57:02Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheVintik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thevintik/32/60494_2.png) [@TheVintik](https://discuss.elastic.co/u/TheVintik)\
**Post date:** [October 8, 2020, 11:57am UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/1 "2020-10-08T11:57:03Z")

</div>

Hello,

Does anybody know - is it possible to transform index name to lowercase in APM config file?

Started to getting warning after apm upgrade to latest version:

```auto
WARN	[elasticsearch]	elasticsearch/client.go:407	Cannot index event publisher.Event{Content:beat.Event ... n":"Invalid index name [apm-7.9.2-span-SomeNewIndex-2020.10.08], must be lowercase","index_

```

I am using this config for custom indexes and it was worked for me on 7.7.1:

```auto
index: "apm-%{[observer.version]}-%{+yyyy.MM.dd}"
  indices:
    - index: "apm-%{[observer.version]}-sourcemap"
      when.contains:
        processor.event: "sourcemap"
    - index: "apm-%{[observer.version]}-error-%{[service.name]}-%{+yyyy.MM.dd}"
      when.contains:
        processor.event: "error"

```

So, looks like I need to find a way to transform %{[service.name]} to lowercase. Is it possible?

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [October 8, 2020, 12:16pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/2 "2020-10-08T12:16:33Z")

</div>

May be an i[ngest pipeline](https://www.elastic.co/guide/en/elasticsearch/reference/master/accessing-data-in-pipelines.html) to update document metadata like \_index followed by a [lower case processor](https://www.elastic.co/guide/en/elasticsearch/reference/current/lowercase-processor.html)

---

<div class="post-metadata">

**Author:** ![TheVintik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thevintik/32/60494_2.png) [@TheVintik](https://discuss.elastic.co/u/TheVintik)\
**Post date:** [October 8, 2020, 12:22pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/3 "2020-10-08T12:22:12Z")

</div>

will check but looks like it is ES transformation, but my issue is in APM, not sure about this...

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [October 8, 2020, 12:31pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/4 "2020-10-08T12:31:39Z")

</div>

You can simply make sure all services instrumented by Elastic APM agents have a lower-case name

---

<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:** [October 8, 2020, 12:38pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/5 "2020-10-08T12:38:48Z")

</div>

Elasticsearch is limiting index names to lowercase characters only, that did not change between `7.7` and `7.9` though, [refer to ES index name restrictions (7.7)](https://www.elastic.co/guide/en/elasticsearch/reference/7.7/indices-create-index.html#indices-create-api-path-params).

You can manually configure the service name for every APM agent; therefore as @ylasri pointed out, you could ensure that your service names fulfill all ES index name requirements when using them as part of ES index names.

---

<div class="post-metadata">

**Author:** ![TheVintik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thevintik/32/60494_2.png) [@TheVintik](https://discuss.elastic.co/u/TheVintik)\
**Post date:** [October 8, 2020, 12:58pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/6 "2020-10-08T12:58:44Z")

</div>

> that did not change between `7.7` and `7.9` though,

Interesing... Will double check, but today I had upgraded my ES and Kibana from 7.7 to 7.9 - and it is working as expected.

I have three APM Server instances with the same configs.

I stopped all apm server services and upgraded apm server on the first instance and run it. After that I saw this warning and I stopped getting any data in APM (there were no any data in Kibana/APM). I stopped apm server 7.9 and run apm in other 2 instances with APM 7.7 - and there is not any errors and I started getting data.

So, for now, I am trying to figure out - what is wrong with 7.9. All instances have the same configs.

---

<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:** [October 8, 2020, 1:45pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/7 "2020-10-08T13:45:38Z")

</div>

Thanks for the details @TheVintik,  
I was able to reproduce - the `service.name` ended up as a lower case index name in `7.7`, but does not anymore since `7.8`. I am going to look into that in more detail and will come back to you.

In the meantime, you could make use of configuring the service name in the agents (as suggested above) as a workaround.

---

<div class="post-metadata">

**Author:** ![TheVintik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thevintik/32/60494_2.png) [@TheVintik](https://discuss.elastic.co/u/TheVintik)\
**Post date:** [October 8, 2020, 1:48pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/8 "2020-10-08T13:48:26Z")

</div>

Thank you, will wait for possible solutions from you. It is hard to setup service name in the agents for now ☹

---

<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:** [October 8, 2020, 2:22pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/9 "2020-10-08T14:22:01Z")

</div>

Thanks again for reporting; I identified the issue, you can follow along at [https://github.com/elastic/apm-server/issues/4294](https://github.com/elastic/apm-server/issues/4294)

---

<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:** [October 12, 2020, 12:49pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/10 "2020-10-12T12:49:22Z")

</div>

The fix has been merged and will be released with the next `7.9.x` release.

---

<div class="post-metadata">

**Author:** ![TheVintik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thevintik/32/60494_2.png) [@TheVintik](https://discuss.elastic.co/u/TheVintik)\
**Post date:** [October 12, 2020, 1:10pm UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/11 "2020-10-12T13:10:25Z")

</div>

awesome, thank you!

---

<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 2, 2020, 9:10am UTC](https://discuss.elastic.co/t/index-name-must-be-lowercase-after-upgrade-to-7-9-2/251433/12 "2020-11-02T09:10:43Z")

</div>

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