active_metrics
Creates, updates, deletes, gets or lists an active_metrics resource.
Overview
| Name | active_metrics |
| Type | Resource |
| Id | datadog.metrics.active_metrics |
Fields
The following fields are returned by SELECT queries:
- list_active_metrics
| Name | Datatype | Description |
|---|---|---|
from | string | Time when the metrics were active, seconds since the Unix epoch. |
metrics | array | List of metric names. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_active_metrics | select | from | host, tag_filter | Get the list of actively reporting metrics from a given time until now. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
from | integer (int64) | Seconds since the Unix epoch. |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
host | string | Hostname for filtering the list of metrics returned. If set, metrics retrieved are those with the corresponding hostname tag. |
tag_filter | string | Filter metrics that have been submitted with the given tags. Supports boolean and wildcard expressions. Cannot be combined with other filters. (example: env IN (staging,test) AND service:web) |
SELECT examples
- list_active_metrics
Get the list of actively reporting metrics from a given time until now.
SELECT
from,
metrics
FROM datadog.metrics.active_metrics
WHERE from = '{{ from }}' -- required
AND host = '{{ host }}'
AND tag_filter = '{{ tag_filter }}'
;