We have an elasticsearch cluster with 4 data nodes. We have our FleetServers with APM integration enabled. We have noticed that elasticsearch creates at least an index per app / service for example:
.ds-logs-apm.app.myapp1-2024.12.19-000019
.ds-logs-apm.app.myapp2-2024.12.19-000019
.ds-logs-apm.app.myapp3-2024.12.19-000019
.ds-metrics-apm.app.myapp1-2024.12.19-000019
.ds-metrics-apm.app.myapp2-2024.12.19-000019
.ds-metrics-apm.app.myapp3-2024.12.19-000019
The result is that we hit our shards limits (4000/4000). We were wondering if we can setup the APM integration to save all the metrics and the logs in two big indexes (one for metrics and one for logs) instead of split them per app.
We are using ELK 8.16.2
All our cluster and fleet servers are deployed on premise and are using the Fleet-managed APM Server.
When you say "it seems like it is missing the namespace I would expect", I can tell that we have customized the "namespace" configuration in the APM integration with "prod" following the example here Data streams | Fleet and Elastic Agent Guide [8.16] | Elastic.
So, yes the real indexes names are: .ds-logs-apm.app.myapp1-prod-2024.12.19-000019
Excellent ... so you can try the Pipeline I suggested above just change
"namespace": [
"prod"
]
and that will put all your APM logs into the single data stream. logs-apm.app.default-prod
All the Kibana Apps / functionality / etc... will / should still work.
You can change the dataset to your own name.. just make sure it starts with apm.app. example others have done apm.app.all
Make sure you test in Non-Prod
Same approach to metrics should work... there can sometimes be field collision so definitely test in in Non-Prod
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.