简体   繁体   中英

How can I make a cumulative sum graph in grafana, from an elasticsearch data source?

Relevant info:

  • Grafana v5.4.2 (commit: d812109)
  • ElasticSearch version: 5.6.8

There is an ES index that is a log of events over time, and the events are categorised (per country). There is a grafana instance which has this ES index as a data source.

In grafana, I would like to make a graph over time of these events, such that the value for any given date on the x-axis would be the total number of events since the beginning of time until that time, reflected on the y-axis.

Basically, a normal, ordinary cumulative-sum graph.

I have read several tutorials, and nothing actually allows this. There is a lot of irrelevant information about showing cumulative sum on the tooltip, which is not useful to me.

Is this possible? If so, how can I do it?

After contacting grafana directly I received the answer that this is not currently possible. All such computation must be done by the data source, not by grafana.

Look at this page. https://grafana.com/docs/features/graphs/

Cumulative - Sum of series below plus the series you hover over

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM