首页 文章

InfluxDB - 查询自时间系列中上一个数据点以来的毫秒数

提问于
浏览
1

是否有可能编写一个InfluxDB查询,它会给出自上次输入时间序列以来的毫秒数?我想在Grafana中添加一个显示数据年龄的单一统计面板 .

1 回答

  • 1

    我不认为这是可能的,因为你无法单独查询时间 . 一个Influxdb查询在查询中至少需要 one non-time 字段 . 您可以通过在单独查询的额外字段中双倍节省时间来解决此问题 .

    但你仍然想使用 now() - "the extra time field" . 但据我发现你也不能在grafana里面使用 now() .

    Update :现在在grafanas github上有一个[Feature-Request] . 请务必投票,以便有一天实施:https://github.com/grafana/grafana/issues/6710

    Update 2 :该功能最终实现 - >请在此处查看我的回答:How to show "33 minutes ago" on Grafana dashboard with InfluxDB?

相关问题