DataDog / documentation

The source for Datadog's documentation site.

Home Page:http://docs.datadoghq.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Metric advanced filtering: mixing wildcards and variables?

miparnisari opened this issue · comments

Saw this:

## Wildcard filtered queries
Tag value prefix and suffix wildcard matching is supported:
- `pod_name: web-*`
- `cluster:*-trace`
**Note**: Prefix and suffix wildcard matching in the same filter is not supported.
### Wildcard filtered query examples
```
avg:system.disk.in_use{!device:/dev/loop*} by {device}
```
{{< img src="metrics/advanced-filtering/wildcard_suffix.png" alt="Wildcard used as suffix" style="width:100%;" >}}
```
sum:kubernetes.pods.running{service:*-canary} by {service}
```
{{< img src="metrics/advanced-filtering/wildcard_prefix.png" alt="Wildcard used as prefix" style="width:100%;" >}}

Is it possible to mix wildcard queries with template variables? E.g.

pod_name:$environment.value-*

where $environment is the variable

Hi @miparnisari, thanks for your question! Wild card support between metrics and dashboard template variables are a bit different. For more information on using the wildcard for Dashboard Template Variables, see this documentation. If this does not answer your question, please reach out to our Support team so they can get a better understanding of your use case.

Note: The wildcard syntax is not supported following a template variable.

Boo :(