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
My compose config along with app code that brings up the stack @ https://github.com/calshankar/EFK-stack/blob/master/docker-compose.yml
since all containers are communicating on locahost, i thought it was easy to setup. Seems like config issue that i'm not able to trace
Could you point me to the source code of any demo docker nodejs app that I can cross reference to weed out the issue?
Also is there any issue in the way i bring up the stack using compose file? Are there any recommendation that i can take a look at
Here is the line from index.js
var apm = require('elastic-apm-node').start({
// Set required service name (allowed characters: a-z, A-Z, 0-9, -, _, and space)
serviceName: 'app-boron',
// Use if APM Server requires a token
secretToken: '',
// Set custom APM Server URL (default: http://localhost:8200)
serverUrl: 'http://127.0.0.1:8200'
})
const express = require('express'),
mongodb = require('mongodb'),
app = express(),
bodyParser = require('body-parser'),
url = process.env.MONGODB_URI || 'mongodb://localhost:27017/board'