Run Elastic Agent

edit

This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

This experimental release allows you to try out new capabilities. There is no migration path for future releases. You must test in a dedicated cluster. Delete the cluster when you are done. You will not be able to upgrade the cluster.

Elastic Agent runs in two modes: standalone or fleet. The two modes differ in how you configure and manage the Agent.

Run in Fleet mode

edit

With fleet mode, you manage Elastic Agent remotely. The Agent uses a trusted Kibana instance to retrieve configurations and report Agent events. This trusted Kibana instance must have Ingest Manager and Fleet enabled.

To create a trusted communication channel between Elastic Agent and Kibana, enroll the Agent to Fleet.

To enroll an Elastic Agent to Fleet:

  1. Stop the Agent, if it’s already running.
  2. Go the Fleet tab in Ingest Manager, and click Enroll new agent to generate a token. See Get started for detailed steps.
  3. Enroll the Agent:

    ./elastic-agent enroll http://localhost:5601 $token

    Where $token is an enrollment token acquired from Fleet.

To start Elastic Agent, run:

./elastic-agent run

Run in standalone mode (default)

edit

With standalone mode, you manually configure and manage the Agent locally. Each Agent is configured to be in standalone mode by default after installation.

If Elastic Agent is installed as an auto-starting service, it will run automatically when you restart your system.

To start Elastic Agent manually, run:

./elastic-agent run

If no configuration file is specified, Elastic Agent uses the default configuration, elastic-agent.yml, which is located in the same directory as Elastic Agent. Specify the -c flag to use a different configuration file.

For configuration options, see Configuration settings.