﻿---
title: Configure feature flags for standalone Elastic Agents
description: The agent.features section of the elastic-agent.yml file contains settings that change the default behavior of Elastic Agent. These settings might include...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/reference/fleet/elastic-agent-standalone-feature-flags
products:
  - Elastic Agent
  - Elastic Documentation
  - Fleet
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# Configure feature flags for standalone Elastic Agents
The `agent.features` section of the `elastic-agent.yml` file contains settings that change the default behavior of Elastic Agent. These settings might include experimental features, changes to behaviors within Elastic Agent or its components, or settings that could cause a breaking change. For example, a setting that changes information included in events might be inconsistent with the naming pattern expected in your configured Elastic Agent output.
Most of these settings are turned off by default. To change a setting, set its `enabled` flag. For example, to turn on a setting that's off by default, set `enabled` to `true`:
```yaml
agent.features:
  mysetting:
    enabled: true
```


## Feature flag configuration settings

You can specify the following settings in the `agent.features` section of the `elastic-agent.yml` file.
<definitions>
  <definition term="Fully qualified domain name (FQDN)">
    When enabled, information provided about the current host through the [host.name](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/reference/fleet/host-provider) key, in events produced by Elastic Agent, is in FQDN format (`somehost.example.com` rather than `somehost`). This helps you to distinguish between hosts on different domains that have similar names. With `fqdn` enabled, the fully qualified hostname allows each host to be more easily identified when viewed in Kibana.
    <note>
      FQDN reporting is not currently supported in APM.
    </note>
    For FQDN reporting to work as expected, the hostname of the current host must either:
    - Have a CNAME entry defined in DNS.
    - Have one of its corresponding IP addresses respond successfully to a reverse DNS lookup.
    If neither prerequisite is satisfied, `host.name` continues to report the hostname of the current host as if the FQDN feature flag were not enabled.
    To enable fully qualified domain names, set `enabled: true` for the `fqdn` setting:
    ```yaml
    agent.features:
      fqdn:
        enabled: true
    ```
  </definition>
  <definition term="Encrypted config Elastic Stack: Generally available since 9.4">
    When enabled, Elastic Agent encrypts the contents of `elastic-agent.yml` and stores them in `fleet.enc`. It then replaces the contents of `elastic-agent.yml` with only the `encrypted_config` setting, to show that Elastic Agent uses the encrypted configuration.
    <note>
      Fleet-managed Elastic Agents ignore this flag as they always encrypt storage.
    </note>
    To reload the config, replace the `elastic-agent.yml` file and restart the Elastic Agent.
    To enable encrypted config for a standalone Elastic Agent, set `enabled: true` for the `encrypted_config` setting:
    ```yaml
    agent.features:
      encrypted_config:
        enabled: true
    ```
    <note>
      If you turn off encryption, delete the `fleet.enc` file manually.
    </note>
  </definition>
  <definition term="Default processors Elastic Stack: Generally available since 9.4">
    Depending on the input, Elastic Agent uses the [`add_host_metadata`](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/reference/fleet/add_host_metadata-processor), [`add_cloud_metadata`](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/reference/fleet/add-cloud-metadata-processor), [`add_docker_metadata`](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/reference/fleet/add_docker_metadata-processor), and [`add_kubernetes_metadata`](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9507/reference/fleet/add_kubernetes_metadata-processor) default processors to add host, cloud, Docker, and Kubernetes metadata to the events it collects. You can turn off these processors when you don't need the metadata they add, for example to reduce the size of your events. Turning them off removes the fields they add, so check that the dashboards, alerts, and other features you use don't rely on those fields.
    Depending on your version, the default processor settings apply to the following:
    - <applies-to>Elastic Stack: Planned</applies-to> All data that Elastic Agent collects
    - <applies-to>Elastic Stack: Generally available in 9.5</applies-to> All data that Elastic Agent collects except data from inputs that use variables from [dynamic providers](/elastic/docs-content/pull/9507/reference/fleet/providers#dynamic-providers), such as `${kubernetes.*}` or `${docker.*}`
    - <applies-to>Elastic Stack: Generally available in 9.4</applies-to> Only metrics and Elastic Agent monitoring data, except metrics from inputs that use variables from dynamic providers
    To turn off all four processors, set `enabled` to `false` for the `default_processors` setting:
    ```yaml
    agent.features:
      default_processors:
        enabled: false
    ```
    <applies-to>Elastic Stack: Planned</applies-to> You can also [turn off individual processors for all outputs](#elastic-agent-standalone-feature-flag-default-processors), or [turn off processors only for the data sent to a specific output](/elastic/docs-content/pull/9507/reference/fleet/elastic-agent-output-configuration#elastic-agent-output-default-processors).
  </definition>
</definitions>


### Turn off individual default processors

<applies-to>
  - Elastic Stack: Planned
</applies-to>

To turn off individual default processors, set them to `false` in the `default_processors` setting. The processors you don't list stay on:
```yaml
agent.features:
  default_processors:
    add_docker_metadata: false
    add_kubernetes_metadata: false
```

Individual processor settings take precedence over `enabled`. For example, this configuration turns off every default processor except `add_cloud_metadata`:
```yaml
agent.features:
  default_processors:
    enabled: false
    add_cloud_metadata: true
```

To turn off processors only for the data sent to a specific output, refer to [Turn off default processors for an output](/elastic/docs-content/pull/9507/reference/fleet/elastic-agent-output-configuration#elastic-agent-output-default-processors).