Closed duongpc closed 2 years ago
Generally speaking I won’t be able to help you on how to set up APM, and would recommend heading over to the Elastic forums for guidance.
Having said that, going to the URL that’s referenced in the error in your APM logs (https://www.elastic.co/guide/en/apm/guide/current/apm-quick-start.html), there are several prerequisites on the set-up of the ELK stack, including having a "Secure, encrypted connection between Kibana and Elasticsearch."
As the documentation of the image says, the services are not set up with security enabled, so you’ll have to update the configuration of the services to do so (which can be a bit fiddly, hence this not being the case by default in the image).
Going back to the APM documentation, in the Prerequisites section, Self-managed tab, there are instructions to quickly secure Elasticsearch and Kibana for testing purposes, so that would be my recommendation to move forward with your set-up.
Apparently ELK 8+ requires fleet setup to use APM, I was under assumption that I could get away from it by setting up APM legacy server, turns out fleet is mandatory...
I decided to downgrade to build 7.17.1
FROM sebp/elk:7.17.1
RUN curl -L -O https://artifacts.elastic.co/downloads/apm-server/apm-server-7.17.1-amd64.deb
RUN dpkg -i apm-server-7.17.1-amd64.deb
EXPOSE 8200
I was able to get kibana to recognize the APM server, however, from windows's command prompt, if I run:
curl localhost:8200
curl: (52) Empty reply from server
but inside the container, I got some result
# curl localhost:8200
{
"build_date": "2022-02-23T22:31:58Z",
"build_sha": "990c162bf1d5106be95d1430c6f3e98df865df7d",
"publish_ready": true,
"version": "7.17.1"
}
I can't quite figure out what missing, does the base image require any additional setup to allow access to port 8200?
Binding the exposed port to a port on the host machine should do the trick (e.g. see https://github.com/spujadas/elk-docker/blob/master/docker-compose.yml for ports 5601, 9200, 5044).
So by default apm-server.yml is using localhost:8200
, changing it to either 0.0.0.0:8200
or :8200
will fix the connection issue
Hello,
I followed the instruction (http://localhost:5601/app/home#/tutorial/apm) to install APM server
After that I run
Checking the server status it showed server was not available
Checking
/var/log/apm-server
I saw this errorI didn't update apm-server.yml since I didn't know the what is elasticsearch's username/password - Is this the issue? If so is there any instruction on how to add an user for elasticsearch? Thank you