- Fleet and Elastic Agent Guide: other versions:
- Fleet and Elastic Agent overview
- Beats and Elastic Agent capabilities
- Quick starts
- Migrate from Beats to Elastic Agent
- Deployment models
- Install Elastic Agents
- Install Fleet-managed Elastic Agents
- Install standalone Elastic Agents
- Install Elastic Agents in a containerized environment
- Run Elastic Agent in a container
- Run Elastic Agent on Kubernetes managed by Fleet
- Advanced Elastic Agent configuration managed by Fleet
- Configuring Kubernetes metadata enrichment on Elastic Agent
- Run Elastic Agent on GKE managed by Fleet
- Run Elastic Agent on Amazon EKS managed by Fleet
- Run Elastic Agent on Azure AKS managed by Fleet
- Run Elastic Agent Standalone on Kubernetes
- Scaling Elastic Agent on Kubernetes
- Using a custom ingest pipeline with the Kubernetes Integration
- Environment variables
- Installation layout
- Air-gapped environments
- Using a proxy server with Elastic Agent and Fleet
- Uninstall Elastic Agents from edge hosts
- Start and stop Elastic Agents on edge hosts
- Elastic Agent configuration encryption
- Secure connections
- Manage Elastic Agents in Fleet
- Configure standalone Elastic Agents
- Create a standalone Elastic Agent policy
- Structure of a config file
- Inputs
- Providers
- Outputs
- SSL/TLS
- Logging
- Feature flags
- Agent download
- Config file examples
- Grant standalone Elastic Agents access to Elasticsearch
- Example: Use standalone Elastic Agent with Elastic Cloud Serverless to monitor nginx
- Example: Use standalone Elastic Agent with Elasticsearch Service to monitor nginx
- Debug standalone Elastic Agents
- Kubernetes autodiscovery with Elastic Agent
- Monitoring
- Reference YAML
- Manage integrations
- Define processors
- Processor syntax
- add_cloud_metadata
- add_cloudfoundry_metadata
- add_docker_metadata
- add_fields
- add_host_metadata
- add_id
- add_kubernetes_metadata
- add_labels
- add_locale
- add_network_direction
- add_nomad_metadata
- add_observer_metadata
- add_process_metadata
- add_tags
- community_id
- convert
- copy_fields
- decode_base64_field
- decode_cef
- decode_csv_fields
- decode_duration
- decode_json_fields
- decode_xml
- decode_xml_wineventlog
- decompress_gzip_field
- detect_mime_type
- dissect
- dns
- drop_event
- drop_fields
- extract_array
- fingerprint
- include_fields
- move_fields
- parse_aws_vpc_flow_log
- rate_limit
- registered_domain
- rename
- replace
- script
- syslog
- timestamp
- translate_sid
- truncate_fields
- urldecode
- Command reference
- Troubleshoot
- Release notes
Add cloud metadata
editAdd cloud metadata
editInputs that collect logs and metrics use this processor by default, so you do not need to configure it explicitly.
The add_cloud_metadata
processor enriches each event with instance metadata
from the machine’s hosting provider. At startup the processor queries a list of
hosting providers and caches the instance metadata.
The following providers are supported:
- Amazon Web Services (AWS)
- Digital Ocean
- Google Compute Engine (GCE)
- Tencent Cloud (QCloud)
- Alibaba Cloud (ECS)
- Huawei Cloud (ECS)
- Azure Virtual Machine
- Openstack Nova
The Alibaba Cloud and Tencent providers are disabled by default, because
they require to access a remote host. Use the providers
setting to select a
list of default providers to query.
Example
editThis configuration enables the processor:
- add_cloud_metadata: ~
The metadata that is added to events varies by hosting provider. For examples, refer to Provider-specific metadata examples.
Configuration settings
editElastic Agent processors execute before ingest pipelines, which means that they process the raw event data rather than the final event sent to Elasticsearch. For related limitations, refer to What are some limitations of using processors?
Name | Required | Default | Description |
---|---|---|---|
|
No |
|
Maximum amount of time to wait for a successful response when detecting the hosting provider. If a timeout occurs, no instance metadata is added to the events. This makes it possible to enable this processor for all your deployments (in the cloud or on-premise). |
|
No |
List of provider names to use. If The list of supported provider names includes:
|
|
|
No |
|
Whether to overwrite existing cloud fields. If |
The add_cloud_metadata
processor supports SSL options to configure the http
client used to query cloud metadata.
For more information, refer to SSL/TLS, specifically the settings under Table 4, “Common configuration options” and Table 5, “Client configuration options”.
Provider-specific metadata examples
editThe following sections show examples for each of the supported providers.
AWS
edit{ "cloud": { "account.id": "123456789012", "availability_zone": "us-east-1c", "instance.id": "i-4e123456", "machine.type": "t2.medium", "image.id": "ami-abcd1234", "provider": "aws", "region": "us-east-1" } }
Digital Ocean
edit{ "cloud": { "instance.id": "1234567", "provider": "digitalocean", "region": "nyc2" } }
GCP
edit{ "cloud": { "availability_zone": "us-east1-b", "instance.id": "1234556778987654321", "machine.type": "f1-micro", "project.id": "my-dev", "provider": "gcp" } }
Tencent Cloud
edit{ "cloud": { "availability_zone": "gz-azone2", "instance.id": "ins-qcloudv5", "provider": "qcloud", "region": "china-south-gz" } }
Huawei Cloud
edit{ "cloud": { "availability_zone": "cn-east-2b", "instance.id": "37da9890-8289-4c58-ba34-a8271c4a8216", "provider": "huawei", "region": "cn-east-2" } }
Alibaba Cloud
editThis metadata is only available when VPC is selected as the network type of the ECS instance.
{ "cloud": { "availability_zone": "cn-shenzhen", "instance.id": "i-wz9g2hqiikg0aliyun2b", "provider": "ecs", "region": "cn-shenzhen-a" } }
Azure Virtual Machine
edit{ "cloud": { "provider": "azure", "instance.id": "04ab04c3-63de-4709-a9f9-9ab8c0411d5e", "instance.name": "test-az-vm", "machine.type": "Standard_D3_v2", "region": "eastus2" } }
Openstack Nova
edit{ "cloud": { "instance.name": "test-998d932195.mycloud.tld", "instance.id": "i-00011a84", "availability_zone": "xxxx-az-c", "provider": "openstack", "machine.type": "m2.large" } }
On this page