1. Fleet Server #
The agents' control point.
Deployment options #
On Elastic Cloud, Fleet Server is provided (Integrations Server). Self-hosted, install it on a dedicated host (or several, behind a load balancer) with a policy containing the Fleet Server integration.
# Kibana › Fleet › Settings : Fleet Server hosts = https://fleet.exemple.fr:8220
# Kibana › Fleet › Add Fleet Server génère la commande, par exemple :
sudo ./elastic-agent install \
--fleet-server-es=https://es.exemple.fr:9200 \
--fleet-server-service-token=<jeton de service> \
--fleet-server-policy=fleet-server-policy \
--fleet-server-port=8220 \
--certificate-authorities=/etc/pki/ca.crt \
--fleet-server-cert=/etc/pki/fleet.crt --fleet-server-cert-key=/etc/pki/fleet.keyCertificates #
Common mistake: Using--insecurein production: the connection is no longer verified. Give agents the certificate authority (--certificate-authorities) and Fleet Server a valid certificate.
2. Enrolling agents #
Linux, Windows, Docker.
The steps #
Each policy has enrollment tokens. The agent presents the token once; it then receives its own API key and the associated policy.
Linux #
curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-9.x.y-linux-x86_64.tar.gz
tar xzf elastic-agent-9.x.y-linux-x86_64.tar.gz && cd elastic-agent-9.x.y-linux-x86_64
sudo ./elastic-agent install --url=https://fleet.exemple.fr:8220 --enrollment-token=<jeton>
sudo elastic-agent statusWindows #
# PowerShell en administrateur
.\elastic-agent.exe install --url=https://fleet.exemple.fr:8220 --enrollment-token=<jeton>Docker #
docker run -d --name elastic-agent --user root \
-e FLEET_ENROLL=1 -e FLEET_URL=https://fleet.exemple.fr:8220 \
-e FLEET_ENROLLMENT_TOKEN=<jeton> \
docker.elastic.co/elastic-agent/elastic-agent:9.x.yDEB and RPM packages #
Packages install the service without enrolling it: then run elastic-agent enroll and start the service.
Depending on the version: replace 9.x.y with your exact stack version: the agent version must not exceed Kibana's and Elasticsearch's.3. Standalone mode #
Without Fleet.
Installing without enrollment #
sudo ./elastic-agent install --non-interactive # répondre « non » à l'enrôlement
sudo vi /opt/Elastic/Agent/elastic-agent.yml # politique exportée depuis Kibana ou écrite à la main
sudo elastic-agent restart && sudo elastic-agent statusGood practice: In Kibana, « Add agent › Run standalone » produces a complete elastic-agent.yml from a policy: an ideal starting point to version it.My progress
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Recommended Articles
Elastic Agent: architecture, Fleet and integrations
Understand Elastic Agent: single collection agent, Fleet and Fleet Server, agent policies, integr...
Standalone Elastic Agent, Logstash and Kafka outputs, and OpenTelemetry (EDOT)
Write a standalone configuration, ship to Logstash or Kafka, and use Elastic Agent as an OpenTele...
Agent policies, integrations, data streams and pipelines
Build agent policies, add integrations (System, Nginx, Custom Logs), choose namespaces, customise...
Elastic Agent or Beats? Choosing and migrating
Compare Elastic Agent and Beats (Filebeat, Metricbeat, Winlogbeat), know when to keep Beats, and ...
Elastic Agent on Kubernetes
Deploy Elastic Agent on Kubernetes: Fleet-managed DaemonSet, Kubernetes integration, kube-state-m...
Monitoring, upgrading and troubleshooting Elastic Agent
Operate an Elastic Agent fleet: states in Fleet, agent monitoring, batch upgrades, diagnostics, l...
Elastic Agent in production: best practices
Elastic Agent best practices: security, policy organisation, volume control, Fleet Server high av...
Elastic Observability: logs, infrastructure, APM and synthetics
Elastic Observability features: log exploration, infrastructure inventory with Elastic Agent and ...
Installing the Datadog agent and configuring integrations
Install the Datadog agent on Linux, Docker and Kubernetes (Datadog Operator), understand datadog....