Skip to main content

active_metrics

Creates, updates, deletes, gets or lists an active_metrics resource.

Overview

Nameactive_metrics
TypeResource
Iddatadog.metrics.active_metrics

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
fromstringTime when the metrics were active, seconds since the Unix epoch.
metricsarrayList of metric names.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_active_metricsselectfromhost, tag_filterGet 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.

NameDatatypeDescription
frominteger (int64)Seconds since the Unix epoch.
sitestringThe 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.
hoststringHostname for filtering the list of metrics returned. If set, metrics retrieved are those with the corresponding hostname tag.
tag_filterstringFilter 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

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 }}'
;