I was able to successfully setup the EFK stack for docker container on a single host but i'm unable to get the agent from the app to communicate with the APM. I looked into the documentation & added the npm module & init config on top of the index.js file but with no luck.
Basically the communication btw app agent module & APM is broken thought the APM service is listening on port 8200
The second issue is helping the node app running in its container find the apm-server. For that, update serverUrl in index.js to point to http://apm_server:8200.
Please check back to let us know how it goes, good luck!
Thank a ton for your response. I'm still not able to setup the connection btw the app(node-agent) & apm server though i got the apm server to communicate via curl, which indicates to me that apm server is open for communication
Could you point me to the source code of any demo docker nodejs app that I can cross reference to weed out the issue with the app config? If you already h'v any demo docker app which works without any issue with apm then i can try that out
I'm not aware of a public project that sets things up as you have here.
I'm fairly certain that an update to serverUrl in index.js to point to http://apm_server:8200 will resolve the issue.
The issue is that the apm-server isn't on localhost relative to your node app. You can confirm this by running curl within your node application container.
Thanks a ton @gil . Completely understand network namespace when the url is fired from inside of the app container. I actually tried with both the serverUrl: 'http://apm_server:8200' & serverUrl: 'http://host-ip:8200' yesterday in vain, realizing the problem could be elsewhere.
Then i realised that the issue could be with the npm package which might not have installed properly in the global name-space. So, i rebuilt the docker image of the app with all the dependencies instead of installing packing @ runtime. Voila..! i got the apm instrumentation working.
I'll share the repo so that anyone could try it out. I'm trying to get metric beat data for mongo DB to show up & once done, i'll share the repo for a very simple use case
@ruflin@simianhacker Is their anything specific to setup inside of mongodb container metric beat dashboard to show up data? I can see some info on packetbeat dashboard for mongo
Another issue that I have is that, I can see only containers of metric beat in Containers Overview Dashboard not all the containers running on the host, though the Docker container dashboard shows up running containers along with the instrumented app.
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.