最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

sql - Custom grafana $timeFilter - Stack Overflow

programmeradmin2浏览0评论

I'm using this query to fetch data for current day power consumption in order to display in a bar chart.

SELECT mean("value") 
FROM "Dataset" 
WHERE "measurement" = 'Ea+' 
  AND time >= '2024-11-18T22:00:00Z'
  AND time <= '2024-11-19T22:00:00Z'
GROUP BY time(1h) 
FILL(null)

The problem is I didn't find any other way to get the result wanted without using exact timestamps... Is there any way I can get some sort of variable like $timeFilter which would fetch the right values for current day?

发布评论

评论列表(0)

  1. 暂无评论