Why does apm-server not display frontend information on kibana if apm javascript agent accesses requests from ingress

When using another output than Elasticsearch (your latest apm-server.yml shows you are using Kafka) you should ensure the index templates, ingest pipelines, etc. are loaded to Elasticsearch before starting to ingest data. You can do so by running

apm-server setup -E output.elasticsearch.hosts=<your-es-hosts> -E output.elasticsearch.username=<username> -E output.elasticsearch.password=<password>

Pass in all the necessary options in a similar way as showed above. The index template will only get applied to new Elasticsearch indices.

@simitt
Hello simitt, I have mounted apm-server.yml into the container
https://paste.ubuntu.com/p/z2Y4w6fNvk/

@simitt
I found that the sourcemap is not stored correctly, will it affect the kibana app-apm display?

"Unable to determine sourcemap storage, sourcemaps will not be applied"
https://paste.ubuntu.com/p/dBhK5C5ydJ/

If you do not provide any Elasticsearch configuration, sourcemaps cannot be applied. However that has no impact on displaying APM data in general in Kibana.
Please see my post above on what you need to consider when working with an output different than Elasticsearch (Kafka in your case).

I use kafka storage, how to configure sourcemap to elasticsearch?
If multiple outputs are configured in apm-server.yml, apm-server cannot start normally

What kind of marks are there in the apmserver log for apm-ui to work properly?
@simitt

apm-server:
host: "0.0.0.0:8200"
rum:
enabled: true
allow_origins: '*'
source_mapping.enabled: true

elasticsearch:
hosts: ["192.168.1.2:9200"]
username: "elastic"
password: "xxx"

apm-server.kibana:
enable: true
host: "192.168.2.1:5601"
username: "elastic"
password: "xxx"
protocol: http
path: /kibana

output.kafka:
enable: true
hosts: ["192.168.1.1"]
topics:
- topic: "apm-span"
when.contains:
processor.event: "span"
- topic: "apm-transaction"
when.contains:
processor.event: "transaction"
- topic: "apm-metric"
when.contains:
processor.event: "metric"
- topic: "apm-error"
when.contains:
processor.event: "error"
- topic: "apm-onboarding"
when.contains:
processor.event: "onboarding"
- topic: "apm-soucemap"
when.contains:
processor.event: "sourcemap" #It's strange that I don't see the sourcemap index in kafka
partition.round_robin:
reachable_only: false
required_acks: 1
codec.json:
pretty: true
worker: 2

You can set an elasticsearch configuration directly in the sourcemap config; please refer to the docs for how to configure elasticsearch for sourcemaps.

I have read the documentation and it requires output.elasticsearch.enable: true

But I already send data to kafka

From the sourcemap config docs:

Configure the Elasticsearch source map retrieval location, taking the same options as output.elasticsearch. This must be set when using an output other than Elasticsearch, and that output is writing to Elasticsearch. Otherwise leave this section empty.

This means that if you use a different output than elasticsearch, you can still configure elasticsearch in apm-server.rum.source_mapping.elasticsearch.*.
So that would mean you configure something like:

apm-server.rum.source_mapping.elasticsearch:
  hosts: ["localhost:9200"]
  username: "foo"
  password: "changeme"
output.elasticsearch.enabled: false
output.kafka.enabled: true

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