What is the rollup function?

Appending this function allows you to control the number of points rolled up into a single point. This function takes two parameters, method and time, like so: .rollup(method,time). The method can be sum/min/max/avg and time is in seconds. You can use either one individually, or both combined like .rollup(sum,120). There are some checks on this, though, because for a given time range we do not return more than 350 points. Thus if you're requesting .rollup(20) where 20 is in seconds, and ask for a month of data, we will be returning the points at a rollup of far greater than 20 seconds.

The as_count() method implicitly uses the .rollup(sum) method.

JSON syntax: rollup/as_count always come at the end, e.g.

avg:system.load.1{*}.rollup(avg,60)
avg:system.load.1{*} by {host}.rollup(avg,60)
etc.

If you're interested in getting more details about Datadog graphing system, see this article: https://help.datadoghq.com/hc/en-us/articles/204820019-Graphing-with-Datadog-from-the-query-to-the-graph.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk