Elastic Agent environment variables
editElastic Agent environment variables
editUse environment variables to configure Elastic Agent when running in a containerized environment. Variables on this page are grouped by action type:
- Common variables
- Configure Kibana: prepare the Fleet plugin in Kibana
- Configure Fleet Server: bootstrap Fleet Server on an Elastic Agent
- Configure Elastic Agent and Fleet: enroll an Elastic Agent
Common variables
editTo limit the number of environment variables that need to be set, the following common variables are available. These variables can be used across all Elastic Agent actions, but have a lower precedence than action-specific environment variables.
These common variables are useful, for example, when using the same Elasticsearch and Kibana credentials to prepare the Fleet plugin in Kibana, configure Fleet Server, and enroll an Elastic Agent.
Settings | Description |
---|---|
(string) The Elasticsearch host to communicate with. Default: |
|
(string) The basic authentication username used to connect to Kibana and retrieve a Default: none |
|
(string) The basic authentication password used to connect to Kibana and retrieve a Default: none |
|
(string) API key used for authenticating to Elasticsearch. Default: none |
|
(string) The path to a certificate authority. By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the Default: |
|
(string) The Kibana host. Default: |
|
(string) The basic authentication username used to connect to Kibana to retrieve a
Default: |
|
(string) The basic authentication password used to connect to Kibana to retrieve a
Default: |
|
(string) The path to a certificate authority. By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the Default: |
|
(bool) When By default, Elastic Agent initializes the Default: |
Prepare Kibana for Fleet
editSettings used to prepare the Fleet plugin in Kibana.
Settings | Description |
---|---|
(string) The Kibana host to enable Fleet on.
Overrides Default: |
|
(string) The basic authentication username used to connect to Kibana and retrieve a Default: |
|
(string) The basic authentication password used to connect to Kibana and retrieve a Default: |
|
(string) The path to a certificate authority. Overrides By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the Default: |
Bootstrap Fleet Server
editSettings used to bootstrap Fleet Server on this Elastic Agent. At least one Fleet Server is required in a deployment.
Settings | Description |
---|---|
(int) Set to Default: none |
|
(string) The Elasticsearch host for Fleet Server to communicate with.
Overrides Default: |
|
(string) The path to a certificate authority. Overrides By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the Default: |
|
(string) The path to the mutual TLS client certificate that Fleet Server will use to connect to Elasticsearch. Default: |
|
(string) The path to the mutual TLS private key that Fleet Server will use to connect to Elasticsearch. Default: |
|
(bool) When Default: |
|
(string) Service token to use for communication with Elasticsearch and Kibana if Default: none |
|
(string) The path to the service token file to use for communication with Elasticsearch and Kibana if Default: none |
|
(string) The name of the policy for Fleet Server to use on itself.
Overrides Default: none |
|
(string) The policy ID for Fleet Server to use on itself. |
|
(string) The binding host for Fleet Server HTTP. Overrides the host defined in the policy. Default: none |
|
(string) The binding port for Fleet Server HTTP. Overrides the port defined in the policy. Default: none |
|
(string) The path to the certificate to use for HTTPS. Default: none |
|
(string) The path to the private key for the certificate used for HTTPS. Default: none |
|
(string) The path to the private key passphrase for an encrypted private key file. Default: none |
|
(string) One of Default: |
|
(string) The SHA-256 fingerprint (hash) of the certificate authority used to self-sign Elasticsearch certificates. This fingerprint is used to verify self-signed certificates presented by Fleet Server and any inputs started by Elastic Agent for communication. This flag is required when using self-signed certificates with Elasticsearch. Default: |
|
(duration) Set to indicate how long Fleet Server will wait during the bootstrap process for Elastic Agent. |
|
(duration) Set to indicate how long Elastic Agent will wait for Fleet Server to check in as healthy. |
Enroll Elastic Agent
editSettings used to enroll an Elastic Agent into a Fleet Server.
Settings | Description |
---|---|
(string) The path to the mutual TLS client certificate that Elastic Agent will use to connect to Fleet Server. |
|
(string) The path to the mutual TLS private key that Elastic Agent will use to connect to Fleet Server. |
|
(string) A comma-separated list of tags to apply to Fleet-managed Elastic Agents. You can use these tags to filter the list of agents in Fleet. |
|
(bool) Set to Default: |
|
(bool) Set to Default: |
|
(string) URL to enroll the Fleet Server into. Default: |
|
(string) The token to use for enrollment. Default: |
|
(string) The token name to use to fetch the token from Kibana. Default: |
|
(string) The token policy name to use to fetch the token from Kibana. Default: |
|
(string) The path to a certificate authority. Overrides By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the Default: |
|
(bool) When Default: |
|
(string) The Kibana host to enable Fleet on.
Overrides Default: |
|
(string) The basic authentication username used to connect to Kibana and retrieve a Default: |
|
(string) The basic authentication password used to connect to Kibana and retrieve a Default: |
|
(string) The path to a certificate authority. Overrides By default, Elastic Agent uses the list of trusted certificate authorities (CA) from the operating
system where it is running.
If the certificate authority that signed your node certificates is not in the host system’s
trusted certificate authorities list, use this config to add the path to the Default: |