It has been a few days that I am going through all documentations to install Elastic-agent either with Fleet Server or Stand-alone, but still, I have not been able to understand how each components works, what is the precise step-by-step method etc. So below, I describe my environment and errors I have got, please tell me what I am doing wrong.
On a Ubuntu 22.04.2 LTS, Elastic Search and Kibana 8.8.1 on Docker - both listening on port 9200, 5601 respectively. I enroll Kibana and successfully login.
Kibana > Management > Fleet > Add Fleet Server
sudo ./elastic-agent install \
--fleet-server-es=https://172.19.0.2:9200 \
--fleet-server-service-token=some_hash\
--fleet-server-policy=fleet-server-policy \
--fleet-server-es-ca-trusted-fingerprint=some_hash \
--fleet-server-port=8220
Agent get installed at /opt/Elastic/Agent and will run as a service and then: Successfully enrolled the Elastic Agent. Elastic Agent has been successfully installed.
After, on Kibana, Fleet Server Connected, Continue enrolling Elastic agent. Clicking Contine -> Enroll in Fleet -> Agent policy 1 -> Create. Then I should run:
sudo ./elastic-agent install --url=https://172.18.0.2:9200 --enrollment-token=some_hash
Error: already installed at: /opt/Elastic/Agent
And if I use enroll:
Error: fail to enroll: fail to execute request to fleet-server: dial tcp 172.18.0.2:9200: connect: connection refused
And if enroll as --insecure
"message":"SSL/TLS verifications disabled.","ecs.version":"1.6.0"}
Error: fail to enroll: fail to execute request to fleet-server: dial tcp 172.18.0.2:9200: connect: connection refused
What I am doing wrong?
Meanwhile, once Adding Fleet Server, the Agent get installed. Then why should I enroll an agent again in the next step with install command?
Also, if I want to use Agent as Stand-alone, I get to same dead-end.
Can you please direct me to step-by-step instruction to implement Stand-alone agent using Docker Image 8.8.1 or using TAR/RPM package?