Elastic Certified Observability Engineer Exam: Logging — Install the Elastic Agent to collect logs

Saidani Mohamed El Amine
3 min readAug 29, 2024

--

Hello again, we continue our blog’s series and today we will see how to Install the Elastic Agent to collect logs.

we will install Fleet Server + install Elastic Agent, we didn’t in the first blog about metrics, we gonna do something similar, now let’s jump to our lab.

we will start first with uninstall Elastic Agent, and also Uninstall Fleet Server.

we go to Fleet in kibana, then we do this:

click on Unenroll agent and we check remove agent immediately.

then we run this command to uninstall Elastic Agent from our machine:

sudo /Library/Elastic/Agent/elastic-agent uninstall

now we have fresh environment, let start with installing Fleet server.

you click on Add Agent, add name and address to your Fleet Server

then you have to run the following commands to install

once it done the Fleet Server will be installed and get the following

now, once it done the Elastic Agent will be install when you install Fleet Server, now lets install Elastic Agent in another machine, I’ll go with Windows OS,

you run this command on your windows machine, it will download the package, unzip it, install the Agent and connect it to the Fleet Server,

here we go, you can see both agents connected to the fleet server.

let me know if you have any question! will see you in the next one ^^

--

--

Saidani Mohamed El Amine

Currently working as DevSecOps consultant with focus on security, monitoring, Big Data, and related topics.