Elastic Agent environment variables
Use 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
To 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 |
|---|---|
ELASTICSEARCH_HOST |
(string) The Elasticsearch host to communicate with. Default: http://elasticsearch:9200 |
ELASTICSEARCH_USERNAME |
(string) The basic authentication username used to connect to Kibana and retrieve a service_token for Fleet.Default: none |
ELASTICSEARCH_PASSWORD |
(string) The basic authentication password used to connect to Kibana and retrieve a service_token for Fleet.Default: none |
ELASTICSEARCH_API_KEY |
(string) API key used for authenticating to Elasticsearch. Default: none |
ELASTICSEARCH_CA |
(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 .pem file that contains your CA’s certificate.Default: "" |
KIBANA_HOST |
(string) The Kibana host. Default: http://kibana:5601 |
KIBANA_USERNAME |
(string) The basic authentication username used to connect to Kibana to retrieve a service_token.Default: elastic |
KIBANA_PASSWORD |
(string) The basic authentication password used to connect to Kibana to retrieve a service_token.Default: changeme |
KIBANA_CA |
(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 .pem file that contains your CA’s certificate.Default: "" |
ELASTIC_NETINFO |
(bool) When false, disables netinfo.enabled parameter of add_host_metadata processor. Setting this to false is recommended for large scale setups where the host.ip and host.mac fields index size increases.By default, Elastic Agent initializes the add_host_metadata processor. The netinfo.enabled parameter defines ingestion of IP addresses and MAC addresses as fields host.ip and host.mac. For more information see add_host_metadataDefault: "false" |
Settings used to prepare the Fleet plugin in Kibana.
Settings used to bootstrap Fleet Server on this Elastic Agent. At least one Fleet Server is required in a deployment.
Settings used to enroll an Elastic Agent into a Fleet Server.