1

A watchdog process reports host "liveness" by writing a measurement in influxdb, e.g.

watchdog,host=host_xyz alive=1

I'm interested in showing in Grafana when too much time has passed since the last measurement. Is there a way to query such information from Influx?

(A similar question was asked here also 9 months ago, but there's no answer to it: InfluxQL: age of record Is it possible that a time series database can't give the age of a record?)

Thanks!

Erion
  • 113
  • 4

1 Answers1

0

In Grafana under Edit > Visualization > Value > Show: you can choose "Time of last point".

This will show the timestamp of the last point in InfluxDB. This is how I do it.

The downside to this is that if the timestamp is not added in real time (i.e. you add a previous of future timestamp in InfluxDB) then the data will be off. (though these cases are more rare).

Newskooler
  • 3,973
  • 7
  • 46
  • 84
  • Thanks for the hint! It is not exactly a solution for what I had in mind, but it helps; I'm also accepting the answer since apparently there is no other way to do this with influx. – Erion Jul 19 '20 at 15:39
  • I know, ideally Influx would give us the value, but I too don't know how to do that (or if possible). – Newskooler Jul 20 '20 at 13:32