I already have a fleet server and elastic instance set up in the cloud somewhere at https://fleet.example.net:8220 and https://elastic.example.net:9200.
Next, I want to install an elastic agent on my laptop. I downloaded the elastic agent on to my laptop. Then I successfully ran this command on my laptop to enroll my elastic agent into the fleet server in the cloud:
./elastic-agent install --url=https://fleet.example.net:8220 `
--fleet-server-es=https://elastic.example.net:9200 `
--fleet-server-service-token=AAEAAWVsYXN0aWMvZmxlZXQtc2VydmVyL3Rva2VuLTE2ODI1Mzg2MzE4NDQ6VjR6a0JpbDlSR5l3R2JmVXB4TFQ0Zc `
--fleet-server-policy=fleet-server-policy
>Elastic Agent has been successfully installed
Now I see entries appearing in my logs-* in Kibana>Discover. That's great and all, but I wanted to understand this command further.
According to the --help, it says:
-
--fleet-server-eswillStart and run a Fleet Server along side this Elastic Agent connecting to the provided elasticsearch -
--urlwillURL to enroll Agent into Fleet
Things fail when I omit the --fleet-server-es flag, during the ./elastic-agent.exe install statement on my laptop. My question is Why? I already have a fleet server running at https://fleet.example.net:8220. Why does my laptop need to create another fleet server or why does it need to reference my elastic server at https://elastic.example.net:9200?
