diff --git a/content/en/agent/guide/use-community-integrations.md b/content/en/agent/guide/use-community-integrations.md index 09e475eafb528..8549cdd93cb82 100644 --- a/content/en/agent/guide/use-community-integrations.md +++ b/content/en/agent/guide/use-community-integrations.md @@ -18,32 +18,32 @@ Community developed integrations for the Datadog Agent are stored in the Datadog ## Setup -For new users, download and install the latest version of the [Datadog Agent][2]. - -### Installation +Follow the installation method for your environment. {{< tabs >}} -{{% tab "Agent v7.21+ / v6.21+" %}} +{{% tab "Host installation" %}} For Agent v7.21+ / v6.21+: 1. Run the following command to install the Agent integration: ``` - datadog-agent integration install -t datadog-== + sudo -u dd-agent datadog-agent integration install -t datadog-== ``` - **Note**: If necessary, prepend `sudo -u dd-agent` to the installation command. - The version for the integration can be found in the respective changelog on the integration's Github repository -2. Configure your integration similar to core [integrations][1]. + The version for the integration can be found in the respective changelog on the integration's GitHub repository. +2. Manage your integration configuration files in the same way as [core integrations][1], placing each configuration in `/etc/datadog-agent/conf.d/.d/conf.yaml`. 3. [Restart the Agent][2]. [1]: /getting_started/integrations/ [2]: /agent/configuration/agent-commands/#restart-the-agent {{% /tab %}} -{{% tab "Containerized" %}} +{{% tab "Containerized installation" %}} +#### Build the image + +To use a community or Marketplace integration in a containerized environment, build a custom Agent image that includes your desired integration. -To use a community or Marketplace integration in a containerized environment, you must build a custom image that includes your desired community integration. +Building a custom image ensures the integration persists across deployments each time a container starts. Use the following Dockerfile to build a custom version of the Agent that includes the `` from [integrations-extras][2]. If you are installing a Marketplace integration, the `` is available in the configuration instructions. @@ -51,35 +51,49 @@ Use the following Dockerfile to build a custom version of the Agent that include FROM gcr.io/datadoghq/agent:latest RUN agent integration install -r -t datadog-== ``` +Build and push the image: -The `agent integration install` command (run inside Docker) issues the following harmless warning: `Error loading config: Config File "datadog" Not Found in "[/etc/datadog-agent]": warn`. You can ignore this warning. - -If you are using Kubernetes, update your Helm chart or Datadog Operator configuration to pull your custom image. - -Use [Autodiscovery][1] to enable and configure the integration. - -[1]: /agent/autodiscovery/ -[2]: https://github.com/DataDog/integrations-extras -{{% /tab %}} +``` +docker build -t /agent:-custom . +docker push /agent:-custom +``` -{{% tab "Agent earlier versions" %}} +If you use both `amd64` and `arm` host architectures, you can also [build multi-architecture images][3]. -For Agent < v7.21 / v6.21: +#### Deploy the image -1. Download the files in the `/datadog_checks//` folder from the [integrations-extra repository][1]. -2. Place `.py` and any other Python files in the Agent's `checks.d` directory. -3. Create a new `.d/` folder in your [Agent configuration directory][2]. -4. Place the `conf.yaml.example` file from the `/datadog_checks//data/` folder in the created directory. -4. Rename this file to `conf.yaml`. -5. Configure your integration similar to core [integrations][3]. -6. [Restart the Agent][4]. +To deploy the custom image in Kubernetes, update your Helm chart or Datadog Operator configuration to pull the image. +##### Helm: +```yaml +agents: + image: + tag: + tagSuffix: "custom" + repository: //agent +``` +##### Operator: +```yaml +apiVersion: datadoghq.com/v2alpha1 +kind: DatadogAgent +metadata: + name: datadog +spec: + global: + registry: / + #(...) + override: + nodeAgent: + image: + name: agent + tag: -custom +``` +Use [Autodiscovery][1] to enable and configure the integration. -[1]: https://github.com/DataDog/integrations-extras -[2]: /agent/configuration/agent-configuration-files/#agent-configuration-directory -[3]: /getting_started/integrations/ -[4]: /agent/configuration/agent-commands/#restart-the-agent +[1]: /agent/autodiscovery/ +[2]: https://github.com/DataDog/integrations-extras +[3]: https://docs.docker.com/build/building/multi-platform/ {{% /tab %}} {{< /tabs >}} @@ -96,3 +110,4 @@ If your site restricts network access, ensure you have added all of the [`ip-ran [1]: https://github.com/DataDog/integrations-extras [2]: https://app.datadoghq.com/account/settings/agent/latest [3]: /agent/configuration/network +[4]: /containers/guide/container-images-for-docker-environments/?tab=gcr