Exiting: error unpacking config data: more than one namespace configured accessing 'output' (source:'apm-server.yml')

There is already an output.elasticsearch configuration in the original docker image, what should I do to close it?

If I set output.elasticsearch.enable: false, how can I output the template of apm-server to elasticsearch?

There are a lot of errors on apm ui, I don’t know what’s going on


https://paste.ubuntu.com/p/KBrfHnHddc/

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: apm-server-config
  labels:
    app: apm-server
data:
  apm-server.yml: |-
    apm-server:
      host: "0.0.0.0:8200"
      rum:
        enabled: true
        allow_origins: '*'
        source_mapping.enabled: true
    setup.template.enabled: true
    setup.template.overwrite: true
    setup.template.append_fields:
      - name: http.request.headers
        type: group
        dynamic: true
      - name: http.response.headers
        type: group
        dynamic: true
      - name: transaction.custom
        type: group
        dynamic: true
      - name: transaction.page
        type: group
        dynamic: true
    apm-server.kibana:
      enable: true
      host: "http://192.168.51.115:31562"
    output.elasticsearch:
      enable: false
      hosts: ["http://192.168.51.115:31004"]
    kafka:
      enable: true
      hosts: ["192.168.10.145:9092","192.168.10.146:9092","192.168.10.147:9092"]
      topics:
      - topic: 'apm-%{[processor.event]}'
      partition.round_robin:
        reachable_only: false
      required_acks: 1
      compression: gzip
      max_message_bytes: 1000000  
    kibana:
      enable: true
      host: "http://192.168.51.115:31562"
      path: /kibana
---
apiVersion: v1
kind: Service
metadata:
  name: apm-server
spec:
  selector:
    app: apm-server
  type: ClusterIP
  ports:
    - protocol: TCP
      port: 8200
      targetPort: 8200
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: apm-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: apm-server
  template:
    metadata:
      labels:
        app: apm-server
    spec:
      containers:
      - name: apm-server
        image: apm-server:7.7.1
        ports:
        - containerPort: 8200
          name: apm-port
        volumeMounts:
        - name: apm-server-config
          mountPath: /usr/share/apm-server/apm-server.yml
          readOnly: true
          subPath: apm-server.yml
      volumes:
      - name: apm-server-config
        configMap:
          name: apm-server-config

Is that "apm-server:7.7.1" image an alias for docker.elastic.co/apm/apm-server:7.7.1? Or have you built your own image? The Docker images we build are configured via the apm-server.yml file, and since you're overriding the file I don't understand how you would end up with that error message.

Anyway, there are typos in your config; you should use "enabled" and not "enable". See Configure the Elasticsearch output | APM User Guide [8.11] | Elastic

There are a lot of errors on apm ui, I don’t know what’s going on

I don't know either. I'd suggest opening a separate topic for that, and provide the Kibana logs.

Thank you for your reply, I am using docker.elastic.co/apm/apm-server:7.7.1
Sorry, my no certification check character is wrong. I will modify and test again.
I have a question, is apm ui generated by apmserver template?

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