This end point allows you to query for metrics from any time period.
k9_get_metrics(query = NULL, metric = NULL, scope = NULL, by = NULL,
from = NULL, to = NULL, .split_request = TRUE)query string
metric name
list of scopes (scope)
key to group aggregation
seconds since the unix epoch
seconds since the unix epoch
if TRUE, automatically split the request when the target period is longer than a day
You can query either query, or the combination of metric, scope and by.
For example, on the one hand you can directly query by using
query = "system.cpu.idle{role:db,environment:test}by{host,region}".
On the other hand, you can specify metric = "system.cpu.idle",
scope = list(role = "db", environment = "test") and by = c("host", "region"),
to build the same query.
Note that, if query is given, the latter will be ignored.
from and by can be one of these:
numeric
POSIXct
POSIXlt
Date
character (parsed by anytime::anytime())
NULL (the current epochtime will be used instead)
http://docs.datadoghq.com/api/?lang=console#metrics http://docs.datadoghq.com/graphing/