Hello to the community,
I am trying to setup APM with an ILM that I configured manually. If I use the default index available in the output.Elasticsearch, I get indexes similar to "apm-7.16.3-error-000001". I now need to add a timestamp to my indexes so that I can know at which date they were created without having to go thru the details of each index individually.
I have referred to the the below docs and pages and tried to get to the mentioned config :
- How to set ElasticSearch Apm Server indexing template as YYYY.mm?
- Configure Index lifecycle management (ILM) | APM Server Reference [7.15] | Elastic
- Configure Index lifecycle management (ILM) | APM Server Reference [7.15] | Elastic
apm-server:
host: "0.0.0.0:8200"
rum.enabled: "true"
ilm:
enabled: "true"
setup:
enabled: "true"
overwrite: "true"
require_policy: "false"
mapping:
- event_type: "error"
policy_name: "My-kibana-ILM-1"
index_suffix: ""
- event_type: "span"
policy_name: "My-kibana-ILM-1"
index_suffix: ""
- event_type: "transaction"
policy_name: "My-kibana-ILM-1"
index_suffix: ""
- event_type: "metric"
policy_name: "My-kibana-ILM-1"
index_suffix: ""
setup:
template:
enabled: "true"
overwrite: "true"
name: "apm-%{[observer.version]}"
pattern: "apm-%{[observer.version]}*"
output:
elasticsearch:
enabled: "true"
protocol: "http"
hosts: ["loggingcluster-master:9200"]
index: "apm-%{[observer.version]}-%{[processor.event]}-%{+yyyy.MM.dd}"
indices:
- index: "apm-%{[observer.version]}-sourcemap-%{+yyyy.MM.dd}"
when.contains:
processor.event: "sourcemap"
- index: "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}"
when.contains:
processor.event: "error"
- index: "apm-%{[observer.version]}-transaction-%{+yyyy.MM.dd}"
when.contains:
processor.event: "transaction"
- index: "apm-%{[observer.version]}-span-%{+yyyy.MM.dd}"
when.contains:
processor.event: "span"
- index: "apm-%{[observer.version]}-metric-%{+yyyy.MM.dd}"
when.contains:
processor.event: "metric"
- index: "apm-%{[observer.version]}-onboarding-%{+yyyy.MM.dd}"
when.contains:
processor.event: "onboarding"
I need my indexes to be created in this format : "apm-7.16.3-error-2022-04-13-000001" (need the date to change dynamically based on each day)
Currently with the above config, I am only able to achieve this :
I was able to configure my logstash (for reference, not to be confused with the APM settings)

Currently working on apm-server : version: 7.16.3


