kolyaiks
kolyaiks

Reputation: 187

DataDog metric query explanation

Struggling figuring out what exactly this thing means in DataDog:

avg:system.io.r-s{app:you} by {host}.rollup(avg,3600)

Why do we use first avg here in case we’ve already defined one datapoint that is avg of values within 3600. What the first avg does here?

Upvotes: 3

Views: 2535

Answers (1)

draav
draav

Reputation: 1943

enter image description here

first avg controls space aggregation. second one controls time aggregation.


if you have a dozen servers how should those servers be combined into a single line? that is what space aggregation decides. for system.io you coud imagine sum could be more interesting than average sometimes. In this case because are you grouping by host there is only 1 "group" per line, so the space aggregation does nothing.


when you zoom out far enough on a graph, you eventually aren't physically able to draw every single data point for every second measured. Each data point will represent a 5 minutes or 10 minute or 48 hour set of data. How do we decide how to combine all the seconds in a 5 minute window? that is what time aggregation decides. If you are zoomed in close enough (or the data is sparse enough) there is one one measurement per data point, and so time aggregation does nothing.

https://docs.datadoghq.com/dashboards/guide/query-to-the-graph/

Upvotes: 3

Related Questions