Issue for Elastic Observability Engineer Lab 2.1 - Elastic Agent

Hi,
For Elastic Observability Engineer Lab 2.1 - Elastic Agent , I stuck on the point
to connect agent to fleet server.

The command I used is

//~/elastic-agent-8.8.2-linux-x86_64$ sudo ./elastic-agent install --//url=https://fleet-server:8220 --enrollment-//token=dnhsQjhJNEJ6VExrOHFFbnlmTEI6Tk94bXp0WGlSSVdGZ1lpbnpQLUNmUQ== --certificate-authorities=/home/elastic/elastic-agent-8.8.2-linux-x86_64/ca.crt

Error

Hey Ganesh,

Welcome to the forum. Thank you for posting your question here.

It seems like there are two different commands used. the screenshot tells me you were using (among others) --fleet-server-es which indicates that you are trying to create an extra Fleet server.

The command you put in text seems to be the correct one. The issue I see with that one is that the location of the --certificate-authorities is incorrect, and should be /home/elastic/ca/ca.crt.

Please let me know if that solves your problem,

Tim Bosman

Hello Tim,

I justed copied the command from lab instructions. So the first point is why it shows command to create the fleet server?
I assume because the fleet server does not exist in my setup, which is required for elastic agent enrollment.
I tried by fixing certification path issue..but main question is why it is asking me to setup fleet server? It should show me command to enroll elastic agent....as per the lab

Hey Ganesh,

There should be a Fleet server in your environment. You can check this by going to the "Fleet" page in Kibana, and check if there is an agent.

I'm not sure what you mean with copied from the lab instructions. As far as I see there is no command in the lab instructions, and you should copy it from Kibana. The thing you should copy from the lab instructions is the --certificate-authorities part. Do you mean that that one is --certificate-authorities=/home/elastic/elastic-agent-8.8.2-linux-x86_64/ca.crt is in the labinstructions? If so we need to update the lab instructions.

To give some background between Agent and Fleet server. Fleet server is essentially an Agent that enables other Agents to get the latest configuration from Elasticsearch and Kibana. Meaning that if you enroll your Agent in the Fleet server we are able to upgrade the configuration from Kibana. Since Fleet server is an Agent to the configuration (Agent policy) determines whether it is actually an Fleet server or not. So if you copy the Agent command for the wrong Agent Policy, you end up with the wrong configuration.

Hope that helps.

Please check email for attachment.

What I mean is....My lab setup should be similar to follow the lab instructions. But in this case when I tried to install/enroll elastic agent on my host.....it first asked me to add Fleet server......and as per the instructions it should allow me to install elastic agent...

Let me know how can I share images with you? I tried to attached it ...not working....emailed you ...not working....

Let me know if we can connect on call….to get it sorted out quickly.

(Attachment forElastic.docx is missing)

Hey Ganesh,

I won't be able to get on a call unfortunately. Lets try to solve the issue here.

If you take a look at step 6 (Lab 2.1). You will need to add the Agent directly after adding the NGINX integration (Step 5). There will be this pop up. If you click the "Add Elastic Agent to your hosts" button. It takes you to the correct page and command.

(If you want you can start the full lab over if you delete the Agent policy in Kibana page "Fleet > Agent Policies > Agent policy 1 > Actions > Delete Policy")

Please let me know it what I said is true.

Edit: Please run cd ~ before you run the command copied from Kibana.

That is what am trying to say from last week...
the command which I am getting after clicking on the "Add Elastic Agent to you hosts" button is to add fleet server

but as per the instructions it should be a command to enroll the elastic agent.....
how can I share images with you?

You can Add pictures in the messages by clicking the picture icon when you send a message.

This is what am getting:picture2

Logically I should get , as per lab instructions:

But what am getting is

Ah. Now I see the problem. Can you show me a screenshot of the Kibana page "Fleet > Agents"?

Added info:
If there is no Agent/Fleet-server, you can run the following command in the command line to restart the Fleet-server:
docker restart fleet-server

Before Restart of fleet

After Restart


But am getting error again like agent already installed...and it is not integreated with Kibana.

Do I really need to spend time on fixing these issues? Logically all these things should be in place for me......so that I ca nuntilize my time fully....but this is horrible that end user need to fix somthing in lab setup.

Please make sure to have my lab up and running so that I can simply follow the steps as is in the instructions ...instead of fixing issues for weeks...that too without having sudo access....

Issue is just simple i think there version issue in strigo labs here use these command to download the agent do nothing and after running these commands

curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.1.0-linux-x86_64.tar.gz

tar -xzf elastic-agent-8.1.0-linux-x86_64.tar.gz

cd elastic-agent-8.1.0-linux-x86_64

after this you can use the given enrollment token url at the end from agent page and run that as given it will install the agent in strigo lab environment and work fine

Hello Kishorkumar, Thanks for the reply..The issue is not related to version.....the lab setup is so horrible for me that elastic agent enrollment worked for 1 day and next day it goes offline......

The horrible experience continue with same lab ..As per lab 2.2 logs: I should able to ingest the mysql log data from server to elastic..but again it shows the error like elastic agent is offline and add fleet-server....

I am not able to understand simple thing...how difficult it will be for elastic experts to sort it our? They know the setup very well..they have all access including sudo ..then also it is on going ...for next lab....and I spent time to fix it....

The problem for me is I cannot delete anything as I do not have sudo access....