Skip to main content

Query Metrics

Query timeseries points.

External Documentation

To learn more, visit the Datadog documentation.

Parameters

ParameterDescription
FromStart of the queried time period, seconds since the Unix epoch.
QueryQuery string. Must end with {*}.
ToEnd of the queried time period, seconds since the Unix epoch.

Example Output

{
"error": "error",
"from_date": 0,
"group_by": [
"group_by",
"group_by"
],
"message": "message",
"query": "query",
"res_type": "time_series",
"series": [
{
"aggr": "avg",
"display_name": "system.cpu.idle",
"end": 6,
"expression": "system.cpu.idle{host:foo,env:test}",
"interval": 1,
"length": 5,
"metric": "system.cpu.idle",
"pointlist": [
[
1575317847,
0.5
],
[
1575317847,
0.5
]
],
"query_index": 5,
"scope": "host:foo,env:test",
"start": 2,
"tag_set": [
"tag_set",
"tag_set"
],
"unit": [
{
"family": "time",
"name": "minute",
"plural": "minutes",
"scale_factor": 60,
"short_name": "min"
},
{
"family": "time",
"name": "minute",
"plural": "minutes",
"scale_factor": 60,
"short_name": "min"
}
]
},
{
"aggr": "avg",
"display_name": "system.cpu.idle",
"end": 6,
"expression": "system.cpu.idle{host:foo,env:test}",
"interval": 1,
"length": 5,
"metric": "system.cpu.idle",
"pointlist": [
[
1575317847,
0.5
],
[
1575317847,
0.5
]
],
"query_index": 5,
"scope": "host:foo,env:test",
"start": 2,
"tag_set": [
"tag_set",
"tag_set"
],
"unit": [
{
"family": "time",
"name": "minute",
"plural": "minutes",
"scale_factor": 60,
"short_name": "min"
},
{
"family": "time",
"name": "minute",
"plural": "minutes",
"scale_factor": 60,
"short_name": "min"
}
]
}
],
"status": "ok",
"to_date": 7
}

Workflow Library Example

Query Metrics with Datadog and Send Results Via Email

Workflow LibraryPreview this Workflow on desktop