﻿---
title: Add an integration to an Elastic Agent policy
description: Add an integration to one or more Elastic Agent policies in Fleet so enrolled agents start collecting data, or deploy it as an Elastic managed integration.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/add-integration-to-policy
products:
  - Elastic Agent
  - Elastic Documentation
  - Fleet
applies_to:
  - Elastic Cloud Serverless: Generally available
  - Elastic Stack: Generally available
---

# Add an integration to an Elastic Agent policy
Add an integration to one or more [Elastic Agent policies](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/agent-policy) so that the Elastic Agents enrolled in those policies start collecting the integration's data. When you add an integration, Fleet creates an integration policy that you can share across several Elastic Agent policies, which reduces the number of integration policies that you need to manage.

## Before you begin

To add an integration to an Elastic Agent policy, your role needs the `All` privilege for **Fleet** and **Integrations**.
<applies-to>Elastic Cloud Serverless: Generally available</applies-to> <applies-to>Elastic Stack: Generally available since 9.1</applies-to> If you [customize sub-feature privileges for Fleet](/elastic/docs-content/pull/9055/reference/fleet/fleet-roles-privileges#fleet-roles-and-privileges-sub-features), the role needs the `All` privilege for **Agent policies**.

## Add an integration

1. In Kibana, find **Integrations** in the navigation menu or use the [global search field](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/explore-analyze/find-and-organize/find-apps-and-objects).
2. Search for and select an integration. You can select a category to narrow your search.
3. Open the **Add <integration>** page:
   - <applies-to>Elastic Cloud Serverless: Generally available</applies-to> <applies-to>Elastic Stack: Planned</applies-to> Selecting the integration opens the **Add <integration>** page. To learn what data the integration collects and how to configure it, click **View documentation** in the **New to this integration?** panel, if the page shows it. Some integrations open their [**Overview** page](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/open-integration-details) instead.
   - <applies-to>Elastic Stack: Generally available from 9.0 to 9.5</applies-to> Selecting the integration opens its **Overview** page. Click **Add <integration>**.
4. If the **Ready to add your first integration?** page opens, click **Add integration only (skip agent installation)**. You can add an Elastic Agent after you add the integration.
5. In the **Configure integration** section, configure the settings specific to the integration.
   If the integration can run as an [Elastic Managed integration](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/manage-data/ingest/managed-integrations/managed-integrations), also select a deployment type, either in a separate **Deployment** section or in the **Deployment options** field. Select **Agent-based** to run the integration on Elastic Agents that you manage. The Elastic managed option doesn't use an Elastic Agent policy, so if you select it, skip the next step:
   - <applies-to>Elastic Cloud Serverless: Generally available</applies-to> <applies-to>Elastic Stack: Generally available since 9.5</applies-to> **Elastic Managed Integration**
   - <applies-to>Elastic Stack: Preview from 9.0 to 9.4</applies-to> **Agentless**
6. In the **Where to add this integration?** section, select where to add the integration:
   - To create a new Elastic Agent policy, select the **New hosts** tab. Enter a name for the new agent policy, and select whether to collect system logs and metrics. Collecting system logs and metrics adds the System integration to the new agent policy.
   - To use existing Elastic Agent policies, select the **Existing hosts** tab. In the **Agent policies** field, select one or more agent policies.
     Selecting more than one agent policy, known as **reusable integration policies**, is available only for certain subscription levels. For more information, refer to [Elastic subscriptions](https://www.elastic.co/subscriptions).
   <note applies-to="Elastic Cloud Serverless: Generally available, Elastic Stack: Generally available since 9.4">
   If the integration you're adding declares a minimum Elastic Agent version requirement and some or all agents enrolled in the target policy don't meet that requirement, a warning indicates that these agents aren't compatible with the integration.You can still add the integration to the policy. If you later upgrade your agents or enroll new agents that meet the minimum version requirement, they receive the integration configuration automatically. For more information, refer to [Version-specific agent policies](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/version-specific-agent-policies).
   </note>
7. Click **Save and continue**.
   A notification confirms that the integration was added. If the agent policies have no Elastic Agents enrolled yet, a dialog prompts you to add one. To install an agent now, click **Add Elastic Agent to your hosts** and follow the instructions in the **Add agent** flyout. To skip this step, click **Add Elastic Agent later**. You can add an agent later from the integration's **Integration policies** tab by clicking **Add agent** in the integration policy's row.

Saving installs the integration if it isn't installed yet. For agent-based deployments, Fleet adds the new integration policy to the Elastic Agent policies that you selected and distributes it to all Elastic Agents enrolled in those policies.
If you're monitoring many hosts that run the same service, you don't need to repeat these steps for each host. Refer to [Scale integration policies across many hosts](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/scale-integration-policies).
To update the integration policy's settings or the Elastic Agent policies that it's added to, refer to [Edit or delete an Elastic Agent integration policy](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/edit-delete-integration-policy).

## Related pages

- [Install Fleet-managed Elastic Agents](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/install-fleet-managed-elastic-agent)
- [View Elastic Agent integration policies](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/view-integration-policies)
- [Upgrade an Elastic Agent integration](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/9055/reference/fleet/upgrade-integration)
- [Elastic integrations reference](https://docs-v3-preview.elastic.dev/elastic/integration-docs/tree/main/reference)