1

It's probably something easy but I'm new to grafana so bear with me. I have data collected every 10 seconds I would like to display in Grafana.

select time, value from "metrics_value" where instance='Processor' and type='counter' and type_instance='message' and time> now() - 1m;
name: metrics_value
---------------
time            value
2016-10-13T09:24:33Z    23583
2016-10-13T09:24:43Z    23583
2016-10-13T09:24:53Z    23583
2016-10-13T09:25:03Z    23583
2016-10-13T09:25:13Z    23583

But it's shown as :

Grafana chart

So it fills in the intermediate points with some values. How could I set the interval of x axis of grafana to show only points of 10 seconds? I know the I could aggregate summarize function to sum up as described here: How to change the x axis in Graphite/Grafana (to graph by day)? But I don't think I can use that.

Community
  • 1
  • 1
Balazs Varhegyi
  • 991
  • 1
  • 18
  • 37

1 Answers1

0

Works properly with:

select sum("value") from "metrics_value" where instance='Processor' and type='counter' and type_instance='message' and time> now() - 1m GROUP BY time(10s) fill(null);

Edit: I also changed "sum" aggregation to mean so grafana calculates the mean of the values when zoomed out. (Otherwise it summed the values.)

Balazs Varhegyi
  • 991
  • 1
  • 18
  • 37