Im trying to set up a full APM e2e scenario with the following stack:
ELK 6.5.1
APM 6.5.1
APM Agent for Java: 1.1.0
Microservices: Spring Boot 2.1
My set up for each of the microservices is:
java -javaagent:elastic-apm-agent-1.1.0.jar
-Delastic.apm.service_name=myservice
-Delastic.apm.server_url=http://apm-server:8200
-Delastic.apm.application_packages=com.mypackage
-jar myservice.jar
Everything is working fine so far as I am to able to see the traces in the timeline but the issue is that in the services tab I see "No services were found" when I should see it.
That's very interesting.
Just so I understand correctly: On the "Services" tab you see "No services were found", but if you click "Traces" you see a list of traces that you can click on, and thereby get to the second screenshot?
Couple of things to try:
The search query context.service.name :* should not make any difference, but try to clear it - just in case.
Try expanding the time range. Right now it is 24 hours. What if you change it to 30 days?
If the above steps fail, try running the following query in Kibana Dev Tools:
Great, so we've established that you have transaction documents in Elasticsearch.
The following is the endpoint that returns the list of services to the UI. By accessing it directly do you get an error or a 200 response? And is the response empty or not? <kibana host>/api/apm/services?start=2018-01-29T10%3A36%3A11.547Z&end=2018-11-30T10%3A36%3A11.547Z
Please also look in the Kibana logs for errors, after accessing the above url.
Lastly, the following aggregation is exactly what is used to build the list of services.
I get a 400 when accessing the endpoint that returns the list of services to the UI. It complains about fielddata=true on processor.event and context.service.name (which I guess fixing it will solve my problem )
[illegal_argument_exception] Fielddata is disabled on text fields by default. Set fielddata=true on [processor.event] in ...... Set fielddata=true on [processor.event] .... Set fielddata=true on [context.service.name] i... Set fielddata=true on [context.service.name] ... Set fielddata=true on [context.service.name] .... Set fielddata=true on [context.service.name]...
I couldn't figure out the query to set fielddata=true on these fields, any tips?
Last bit is that none of these fields are aggregatable, when they should???
It sounds like the index template for the APM indices is missing. Running the following command should show you a list of the APM index templates:
GET _template/apm*
Normally the template is created automatically when starting apm-server. Can you restart apm-server and look for template/load.go:129, and what message it says. For instance:
INFO template/load.go:129 Template already exists and will not be overwritten.
Please view apm-server.yml and ensure the following options are not disabled - they are enabled by default:
I was about to reply to you about what you just said. The problem was indeed due to having disabled (don't know why I had that disabled) the kibana template.
Everything is working fine after enabling it back.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.