diff --git a/content/en/getting_started/integrations/azure.md b/content/en/getting_started/integrations/azure.md index ce757a2d55f..a6175b7ef29 100644 --- a/content/en/getting_started/integrations/azure.md +++ b/content/en/getting_started/integrations/azure.md @@ -236,6 +236,20 @@ You can find your Azure metrics in the metrics summary page in the Datadog platf {{< img src="/getting_started/integrations/azure/GSwAzure_metricExplorer.png" alt="Metric summary image" style="width:100%;" >}} +### Resource tag filtering + +Use tag filters to control which Azure resources have their metrics collected by Datadog. A tag filter is a comma-separated list of tags in the form `key:value`. Only resources that match at least one tag in the filter have their metrics collected. + +You can use wildcards in your tag filters: +- `?` matches a single character. +- `*` matches multiple characters. + +To exclude resources with a given tag, prefix the tag with `!`. Exclusion takes precedence over inclusion. A resource matches the filter if it matches any tag in the list. + +For example: `datadog:monitored,env:production,!plan_tier:basic,instance-type:c1.*` + +This filter collects metrics from resources tagged with `datadog:monitored` or `env:production`, excludes resources tagged with `plan_tier:basic`, and includes resources with an `instance-type` tag matching `c1.*`. + ## Enable log collection You can use the automated log forwarding feature to setup and configure the services and diagnostic settings needed to forward logs to Datadog. If an automated log forwarding control plane already exists in the tenant, this flow modifies it and extends its scope to include the selected subscriptions or management groups. For more detail, see [Azure Automated Log Forwarding Setup][19]. @@ -289,6 +303,20 @@ See [Azure Automated Log Forwarding Architecture][34] for more details. {{% azure-log-archiving %}} +### Resource tag filtering + +Use tag filters to control which Azure resources have their logs forwarded to Datadog. A tag filter is a comma-separated list of tags in the form `key:value`. Only resources that match at least one tag in the filter have their logs forwarded. + +You can use wildcards in your tag filters: +- `?` matches a single character. +- `*` matches multiple characters. + +To exclude resources with a given tag, prefix the tag with `!`. Exclusion takes precedence over inclusion. A resource matches the filter if it matches any tag in the list. + +For example: `datadog:monitored,env:production,!plan_tier:basic,instance-type:c1.*` + +This filter forwards logs from resources tagged with `datadog:monitored` or `env:production`, excludes resources tagged with `plan_tier:basic`, and includes resources with an `instance-type` tag matching `c1.*`. + ## Get more from the Datadog Platform ### Install the Agent for greater visibility into your application diff --git a/content/en/logs/guide/azure-automated-log-forwarding.md b/content/en/logs/guide/azure-automated-log-forwarding.md index 26eea076a23..1da6929825f 100644 --- a/content/en/logs/guide/azure-automated-log-forwarding.md +++ b/content/en/logs/guide/azure-automated-log-forwarding.md @@ -71,6 +71,10 @@ The sections below provide instructions for completing each page of the template 1. Review the finalized deployment details. 2. Click **Create**. +## Resource tag filtering + +You can use tag filters to control which Azure resources have their logs forwarded to Datadog. For tag filter syntax, wildcard support, and examples, see [Resource tag filtering][16] in the Azure getting started guide. + ## Architecture ### Services used @@ -156,3 +160,4 @@ The script first discovers any instances running in each subscription, then prom [13]: https://learn.microsoft.com/azure/azure-monitor/essentials/diagnostic-settings [14]: https://app.datadoghq.com/integrations/azure/add?config_azure-new-onboarding=true [15]: https://learn.microsoft.com/azure/azure-functions/ +[16]: /getting_started/integrations/azure/#resource-tag-filtering-1