diff --git a/content/en/containers/kubernetes/integrations.md b/content/en/containers/kubernetes/integrations.md index 29475cdaeae..6fbebfc7acf 100644 --- a/content/en/containers/kubernetes/integrations.md +++ b/content/en/containers/kubernetes/integrations.md @@ -371,6 +371,35 @@ The `ad_identifiers` parameter takes a list, so you can supply multiple containe `` : The configuration parameters listed under `logs` in your integration's `.d/conf.yaml.example` file. +### Advanced annotation parameters + +In addition to the core Autodiscovery annotations for checks, logs, and instances, you can use additional annotations to customize check behavior: + +#### Tag cardinality + +Set the tag cardinality level for a specific check using the `check_tag_cardinality` annotation. This overrides the global Agent tag cardinality setting for metrics collected by that check. + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: '' + annotations: + ad.datadoghq.com/.checks: | + { + "": { + "init_config": , + "instances": [] + } + } + ad.datadoghq.com/.check_tag_cardinality: "" +spec: + containers: + - name: '' +``` + +For more information about tag cardinality, see [Per-check tag configuration][27]. + ### Auto-configuration The Datadog Agent automatically recognizes and supplies basic configuration for some common technologies. For a complete list, see [Autodiscovery auto-configuration][20]. @@ -673,3 +702,4 @@ For more examples, including how to configure multiple checks for multiple sets [24]: /containers/guide/autodiscovery-examples [25]: /integrations/istio/ [26]: /integrations/postgres +[27]: /getting_started/integrations/#per-check-tag-configuration diff --git a/content/en/getting_started/integrations/_index.md b/content/en/getting_started/integrations/_index.md index 903d62bdcc8..d39fbee9743 100644 --- a/content/en/getting_started/integrations/_index.md +++ b/content/en/getting_started/integrations/_index.md @@ -108,13 +108,16 @@ To better unify your environment, it is also recommended to configure the `env` You can customize tag behavior for individual checks, overriding the global Agent-level settings: 1. **Disable Autodiscovery tags** - + By default, the metrics reported by integrations include tags automatically detected from the environment. For example, the metrics reported by a Redis check that runs inside a container include tags associated with the container, such as `image_name`. You can turn this behavior off by setting the `ignore_autodiscovery_tags` parameter to `true`. 1. **Set tag cardinality per integration check** - + You can define the level of tag cardinality (low, orchestrator, or high) on a per-check basis using the `check_tag_cardinality` parameter. This overrides the global tag cardinality setting defined in the Agent configuration. +{{< tabs >}} +{{% tab "Configuration file" %}} + ```yaml init_config: # Ignores tags coming from autodiscovery @@ -126,6 +129,50 @@ check_tag_cardinality: low # Rest of the config here ``` +{{% /tab %}} +{{% tab "Kubernetes annotations" %}} + +For containerized environments using Kubernetes, you can set these parameters through [Autodiscovery annotations][1]: + +```yaml +apiVersion: v1 +kind: Pod +metadata: + name: redis-app + annotations: + ad.datadoghq.com/redis.checks: | + { + "redisdb": { + "init_config": {}, + "instances": [ + { + "host": "%%host%%", + "port": 6379 + } + ] + } + } + ad.datadoghq.com/redis.check_tag_cardinality: "low" +spec: + containers: + - name: redis + image: redis:latest +``` + +The supported annotation format is: +``` +ad.datadoghq.com/.check_tag_cardinality: "" +``` + +Where `` can be `low`, `orchestrator`, or `high`. + +[1]: /containers/kubernetes/integrations/?tab=annotations#configuration + +{{% /tab %}} +{{< /tabs >}} + +
The check_tag_cardinality parameter only affects metrics collected by integration checks. It does not affect metrics sent through DogStatsD. To configure DogStatsD tag cardinality, use the global dogstatsd_tag_cardinality configuration parameter or the DD_DOGSTATSD_TAG_CARDINALITY environment variable.
+ ### Validation To validate your Agent and integrations configuration, [run the Agent's `status` subcommand][28], and look for new configuration under the Checks section.