Any label in namespace for apm-server 8.0.1

Installed Elasticsearch via the Elasticsearch (ECK) Operator 2.0.0.
Elasticsearch

  spec:
  auth: {}
  http:
    service:
      metadata: {}
      spec: {}
    tls:
      certificate: {}
  monitoring:
    logs: {}
    metrics: {}
  nodeSets:
    - config:
        node.attr.attr_name: attr_value
        node.roles:
          - master
          - ingest
          - data
        node.store.allow_mmap: false
      count: 1
      name: default
      podTemplate:
        metadata:
          creationTimestamp: null
          labels:
            foo: bar
        spec:
          containers:
            - name: elasticsearch
              resources:
                limits:
                  cpu: '2'
                  memory: 4Gi
                requests:
                  cpu: '1'
                  memory: 4Gi
  transport:
    service:
      metadata: {}
      spec: {}
    tls:
      certificate: {}
  updateStrategy:
    changeBudget: {}
  version: 8.0.1

kibana

spec:
  count: 1
  elasticsearchRef:
    name: elasticsearch-sample
  enterpriseSearchRef:
    name: ''
  http:
    service:
      metadata: {}
      spec: {}
    tls:
      certificate: {}
  monitoring:
    logs: {}
    metrics: {}
  podTemplate:
    metadata:
      creationTimestamp: null
      labels:
        foo: bar
    spec:
      containers:
        - name: kibana
          resources:
            limits:
              cpu: '2'
              memory: 2Gi
            requests:
              cpu: 500m
              memory: 1Gi
  version: 8.0.1

apm-server

spec:
  config:
    apm-server.data_streams.namespace: test333
  count: 1
  elasticsearchRef:
    name: elasticsearch-sample
  http:
    service:
      metadata: {}
      spec: {}
    tls:
      certificate: {}
  kibanaRef:
    name: kibana-sample
  podTemplate:
    metadata:
      creationTimestamp: null
    spec:
      containers: null
  version: 8.0.1

app - petclinic

  spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: test-application
      app.kubernetes.io/name: petclinic
  template:
    metadata:
      creationTimestamp: null
      labels:
        app.kubernetes.io/component: test-application
        app.kubernetes.io/name: petclinic
    spec:
      volumes:
        - name: elastic-apm-agent
          emptyDir: {}
      initContainers:
        - name: download-agent
          image: 'docker.elastic.co/observability/apm-agent-java:1.29.0'
          command:
            - cp
            - '-v'
            - /usr/agent/elastic-apm-agent.jar
            - /elastic/apm/agent
          resources: {}
          volumeMounts:
            - name: elastic-apm-agent
              mountPath: /elastic/apm/agent
          imagePullPolicy: IfNotPresent
      containers:
        - resources: {}
          name: petclinic
          env:
            - name: ELASTIC_APM_SERVER_URL
              value: 'https://apmserver-sample-apm-http:8200'
            - name: ELASTIC_APM_SERVICE_NAME
              value: petclinic
            - name: ELASTIC_APM_APPLICATION_PACKAGES
              value: org.springframework.samples.petclinic
            - name: ELASTIC_APM_ENVIRONMENT
              value: dev
            - name: JAVA_TOOL_OPTIONS
              value: '-javaagent:/elastic/apm/agent/elastic-apm-agent.jar'
            - name: KUBERNETES_NAMESPACE
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.namespace
            - name: ELASTIC_APM_VERIFY_SERVER_CERT
              value: 'false'
          ports:
            - name: petclinic-http
              containerPort: 8080
              protocol: TCP
          imagePullPolicy: IfNotPresent
          volumeMounts:
            - name: elastic-apm-agent
              mountPath: /elastic/apm/agent
          terminationMessagePolicy: File
          image: 'arey/springboot-petclinic:latest'

and have a few questions

  1. data_stream.namespace="default" can't be changed. different configuration options do not work.
    Screenshot_2

  2. how to make data_stream.namespace equal to kubernetes.namespace or some additional field/label (example - PROJECT). in versions 7.x it was possible to do -

output.elasticsearch.index: "apm-%{[observer.version]}-%{[processor.event]}-%{[kubernetes.namespace]}-%{+yyyy.MM.dd}"

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