RousselTMLEARNING

Observability

Monitoring, upgrading and troubleshooting Elastic Agent

Operate an Elastic Agent fleet: states in Fleet, agent monitoring, batch upgrades, diagnostics, logs, common problems (connectivity, certificates, permissions, duplicates) and air-gapped sites.

1. Monitoring the fleet #

Fleet and agent monitoring.

States #

Healthy, unhealthy, offline, updating.

Enable agent monitoring in the policy: each agent ships its own logs and metrics (logs-elastic_agent*, metrics-elastic_agent*) and Fleet shows the state of each component.

On the host #

elastic-agent status output.
sudo elastic-agent status --output=full
sudo elastic-agent inspect           # politique effective
sudo journalctl -u elastic-agent -f  # journaux du service

2. Upgrading #

In batches, without interruption.

The approach #

  1. Upgrade Elasticsearch and Kibana first: the agent must not be newer than them.
  2. Upgrade Fleet Server.
  3. Upgrade a pilot batch of agents from Fleet (select by policy or tag).
  4. Roll out with a progressive (rolling) or scheduled upgrade.
sudo elastic-agent upgrade 9.x.y   # agent autonome ; les agents gérés se mettent à jour depuis Fleet

3. Troubleshooting #

Diagnostics and common problems.

The diagnostics bundle #

sudo elastic-agent diagnostics   # crée un .zip : politique, logs, état, profils
# ou depuis Fleet : Agent › Actions › Request diagnostics .zip

Common problems #

SymptomLikely causeCheck
Agent offlineFleet Server unreachable, proxy, firewallcurl -v https://fleet.exemple.fr:8220/api/status
Healthy agent but no dataWrong Elasticsearch output, API key permissionsagent logs: 401/403 errors
Certificate errorMissing certificate authority--certificate-authorities
Missing logsWrong path or read permissionselastic-agent inspect
Duplicate documentsBeat and integration on the same filesstop the old collector

Air-gapped sites #

Good to know: Without Internet access, host the Elastic Package Registry and the agent binary registry internally, then set their URLs in Kibana (Fleet › Settings).

Related articles

Elastic Agent: architecture, Fleet and integrations

Understand Elastic Agent: single collection agent, Fleet and Fleet Server, agent policies, integrations, data…

Elastic Agent or Beats? Choosing and migrating

Compare Elastic Agent and Beats (Filebeat, Metricbeat, Winlogbeat), know when to keep Beats, and migrate step…

Installing Fleet Server and enrolling Elastic Agents

Set up Fleet Server, create a policy, enroll Linux, Windows and Docker agents, understand tokens and certific…

Keep learning

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!