Is there any way to output APM server into several elastic indices for every kubernetes namespace? I mean something like:
output.elasticsearch:
hosts: ["http://elasticsearch:9200"]
index: "apm-%{[namespace]}-%{+yyyy.MM.dd}-test"
Is there any way to accomplish this?
And how do I adjust my kubernetes config file to output apm server to kubernetes namespaces:
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elasticsearch
spec:
version: 7.5.1
nodeSets:
- name: default
count: 3
config:
node.master: true
node.data: true
node.ingest: true
node.store.allow_mmap: false
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana
spec:
version: 7.5.1
count: 1
elasticsearchRef:
name: elasticsearch
---
apiVersion: apm.k8s.elastic.co/v1
kind: ApmServer
metadata:
name: apm-server
spec:
version: 7.5.1
count: 1
elasticsearchRef:
name: "elasticsearch"
config:
apm-server:
rum.enabled: true
ilm.enabled: true
http:
service:
spec:
type: LoadBalancer
tls:
selfSignedCertificate:
disabled: true