How to show "33 minutes ago" on the Grafana dashboard with InfluxDB?

I recently created Grafana with InfluxDB. I would like to show a panel that shows how much time has passed since the event.

Examples:

  • Last server message: 33 minutes ago
  • Last user subscribed: 17 minutes ago

I can easily get one metric with the following code:

SELECT time, last("duration") as last_duration FROM custom_events ORDER BY time DESC

But I can't get Grafana to do what I want with a time field.

Any suggestions?

+3
source share
2 answers

Since Grafana (4.6.0) is now possible with singlestat panels.

  • GoTo Options-Tab
  • Select ValueStatTime of last point
  • ValueStatUnitDate & timeFrom Now

enter image description here

+1

(4.0.3) singlelestat. issue. , .

+1

Source: https://habr.com/ru/post/1661719/


All Articles