# Issue for Elastic Observability Engineer Lab 2.1 - Elastic Agent

**URL:** <https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717>\
**Category:** Elastic Agent\
**Created:** [April 18, 2024, 1:52pm UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717 "2024-04-18T13:52:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 18, 2024, 1:52pm UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/1 "2024-04-18T13:52:44Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/b/0b20bc15dfd6175761633fd013415c3cf5a71284.png)

---

<div class="post-metadata">

**Author:** ![TimBosman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timbosman/32/84120_2.png) [@TimBosman](https://discuss.elastic.co/u/TimBosman)\
**Post date:** [April 22, 2024, 8:45am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/2 "2024-04-22T08:45:57Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 9:04am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/3 "2024-04-22T09:04:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TimBosman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timbosman/32/84120_2.png) [@TimBosman](https://discuss.elastic.co/u/TimBosman)\
**Post date:** [April 22, 2024, 9:16am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/4 "2024-04-22T09:16:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 9:24am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/5 "2024-04-22T09:24:57Z")

</div>

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....

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 9:25am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/6 "2024-04-22T09:25:33Z")

</div>

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

(Attachment forElastic.docx is missing)

---

<div class="post-metadata">

**Author:** ![TimBosman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timbosman/32/84120_2.png) [@TimBosman](https://discuss.elastic.co/u/TimBosman)\
**Post date:** [April 22, 2024, 9:40am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/7 "2024-04-22T09:40:36Z")

</div>

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.

 ![Screenshot 2024-04-22 at 11.32.30](https://us1.discourse-cdn.com/elastic/original/3X/b/5/b5f8595002765fd632535a86e8d693187feaa231.png)

(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.

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 9:45am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/8 "2024-04-22T09:45:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![TimBosman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timbosman/32/84120_2.png) [@TimBosman](https://discuss.elastic.co/u/TimBosman)\
**Post date:** [April 22, 2024, 9:47am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/9 "2024-04-22T09:47:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 10:09am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/10 "2024-04-22T10:09:14Z")

</div>

![Picture2](https://us1.discourse-cdn.com/elastic/original/3X/a/d/ad6aff2ab0e1fa2ade007969997e1f775825bd58.png)

This is what am getting:picture2

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 10:10am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/11 "2024-04-22T10:10:09Z")

</div>

Logically I should get , as per lab instructions:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/2/9264c1d3d46fd14ad9bdcb0be699a9cb944795ca.png)

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 10:10am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/12 "2024-04-22T10:10:49Z")

</div>

But what am getting is

 ![Picture2](https://us1.discourse-cdn.com/elastic/original/3X/a/d/ad6aff2ab0e1fa2ade007969997e1f775825bd58.png)

---

<div class="post-metadata">

**Author:** ![TimBosman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timbosman/32/84120_2.png) [@TimBosman](https://discuss.elastic.co/u/TimBosman)\
**Post date:** [April 22, 2024, 10:10am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/13 "2024-04-22T10:10:50Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 10:52am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/14 "2024-04-22T10:52:55Z")

</div>

Before Restart of fleet

 ![beforefleetrestart](https://us1.discourse-cdn.com/elastic/original/3X/9/c/9c476b3ce618c73bfbdd656d2e37d538e4dca636.png)

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 10:53am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/15 "2024-04-22T10:53:29Z")

</div>

After Restart

 ![AfterRestart](https://us1.discourse-cdn.com/elastic/original/3X/b/2/b21b01eb9164899222d490f6a5d705e621ad1ea3.png)

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 22, 2024, 10:54am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/16 "2024-04-22T10:54:07Z")

</div>

![newError](https://us1.discourse-cdn.com/elastic/original/3X/f/8/f8b93118e23b2e98c5d9919f38a77f36211b0648.png)  
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....

---

<div class="post-metadata">

**Author:** ![kishorkumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kishorkumar/32/132930_2.png) [@kishorkumar](https://discuss.elastic.co/u/kishorkumar)\
**Post date:** [April 26, 2024, 6:05pm UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/18 "2024-04-26T18:05:51Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 27, 2024, 4:27am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/19 "2024-04-27T04:27:25Z")

</div>

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......

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 27, 2024, 4:30am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/20 "2024-04-27T04:30:28Z")

</div>

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....

---

<div class="post-metadata">

**Author:** ![ganesh.pawar](https://avatars.discourse-cdn.com/v4/letter/g/a587f6/32.png) [@ganesh.pawar](https://discuss.elastic.co/u/ganesh.pawar)\
**Post date:** [April 27, 2024, 5:23am UTC](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717/22 "2024-04-27T05:23:11Z")

</div>

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

[Next page](https://discuss.elastic.co/t/issue-for-elastic-observability-engineer-lab-2-1-elastic-agent/357717.md?page=2)
