Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I aggregate metrics per day in a Grafana table?

Tags:

grafana

I am charting data with a Grafana table, and I want to aggregate all data points from a single day into one row in the table. As you can see below my current setup is displaying the values on a per / minute basis.

Grafana Table

Question: How can I make a Grafana table that displays values aggregated by day?

|        Day        | ReCaptcha  | T & C |
|-------------------|------------|-------|
| February 21, 2017 |   9,001    | 8,999 |
| February 20, 2017 |      42    |    17 |
| February 19, 2017 |     ...    |   ... |
like image 261
rykener Avatar asked Feb 21 '17 17:02

rykener


People also ask

How do I view metrics in Grafana?

Begin by logging in to your Grafana Cloud organization and navigating to the Cloud Portal. From there, click Log In on your Grafana instance. If you don't do this, you'll get an “expanding series: query must contain metric name” error, as Grafana Cloud limits the size of expensive queries.

What is $__ interval in Grafana?

$__intervalThe Grafana workspace automatically calculates an interval that can be used to group by time in queries.


1 Answers

You can use the summarize function on the metrics panel. Change the query by pressing the + then selecting transform summarize(24h, sum, false) this will aggregate the past 24hr data points into a single point by summing them.

http://graphite.readthedocs.io/en/latest/functions.html#graphite.render.functions.summarize

results

like image 150
Peter Halligan Avatar answered Oct 11 '22 20:10

Peter Halligan