Exiting: error loading config file: yaml: line 48: did not find expected key

Hi All ,

After editing apm.yml in elastic apm, we get the following error.
We get the error in the index line.

output.Elasticsearch:
hosts: ["https://10.0.0.12:9200", "https://10.0.0.13:9200", "https://10.0.0.14:9200", "https://10.0.0.15:9200", "https://10.0.0.16:9200"]
indices:

  • index: "apm-%{[observer.version]}-error-%{+yyyy.MM.dd}"
    when.contains:
    processor.event: "error"
    enabled: true
    api_key: "paVeH4EBgtb9GXBaTD4t:FRDQikP5TkCf6bhf8afePw"
    ssl.enabled: true
    ssl.verification_mode: certificate
    ssl.certificate_authorities: ["/etc/apm-server/certs/ca.crt"]
    bulk_max_size: 1000

apm-server test output --v DEBUG

Error initializing beat: error loading config file: yaml: line 47: did not find expected key

Can you help on the subject?

Thanks.

Hi again ,

1 character left snapping has been fixed.

(when.contains and processor.event)

  • index: "apm-sourcemap"
    when.contains:
    processor.event: "sourcemap"

  • index: "apm-%{[service.name]}-error"
    when.contains:
    processor.event: "error"

  • index: "apm-%{[service.name]}-transaction"
    when.contains:
    processor.event: "transaction"

  • index: "apm-%{[service.name]}-span"
    when.contains:
    processor.event: "span"

  • index: "apm-%{[service.name]}-metric"
    when.contains:
    processor.event: "metric"

Regards.

1 Like

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