I have ELK running in a ec2 instance and installed the apm-server in it
APM-server version: 7.x
I have a springboot application with npm for load testing in other ec2 instance Also installed the apm agent in it
APM Agent version: 1.x
In APMserver.yml:
I have given the private ip for hosts and outputs
Now from springboot server when I tried to connect with apm-server using curl http://xxxx.8200 it connects
Command to start app:
java -javaagent:elastic-apm-agent-1.22.0.jar --config service_name=my-cool-service server_url=http://private(or)publicip:8200 -jar order-service/target/order-service-1.0-SNAPSHOT.jar
Output:
2021-03-27 04:45:59,879 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.22.0 as my-cool-service on Java 11.0.10 Runtime version: 11.0.10+9-Ubuntu-0ubuntu1.18.04 VM version: 11.0.10+9-Ubuntu-0ubuntu1.18.04 (Ubuntu) Linux 4.15.0-1051-aws
2021-03-27 04:45:59,880 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - VM Arguments: [-javaagent:elastic-apm-agent-1.22.0.jar, -Delastic.apm.service_name=my-cool-service, -Delastic.apm.application_packages=org.example,org.another.example, -Delastic.apm.server_url=http://x.x.x.x:8200]
2021-03-27 04:46:03,041 [elastic-apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: { "build_date": "2021-03-18T05:15:57Z", "build_sha": "ef735c0cc1e5aa0d4fe4a363804390776e7775fe", "version": "7.12.0"}
2021-03-27 04:46:03,063 [main] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
2021-03-27 04:46:03,074 [elastic-apm-remote-config-poller] INFO co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Received new configuration from APM Server: {}
Curl output:
{
"build_date": "2021-03-18T05:15:57Z",
"build_sha": "ef735c0cc1e5aa0d4fe4a363804390776e7775fe",
"version": "7.12.0"
}
Kibana.log
There are no errors but below message
{"type":"log","@timestamp":"2021-03-27T04:27:58+00:00","tags":["info","plugins","apm"],"pid":1627,"message":"Config was not found for my-cool-service/undefined"}
When I check agent status
No data has been received from agents yet
I can now see the services in kibana console. The errors where values of :
-Delastic.apm.service_name
and -Delastic.apm.application_packages