Machine on/off based on last timestamp receivced

I’m working on Grafana Docker v 8.3.6. I have a MySQL data source.

In the DB I have series of updates sent from machines to a single table. Each 10 minutes, the machine report back to the server and a new row in the DB is written.

I want to show a single stat with an “ON/OFF” label if the last update received from the machine is greater than 30 minutes ago. I was able to get the information from the DB, but not sure how to convert it to the ON/OFF label I am expecting.

I also need to build a heatmap with ON/OFF stautses of a list of machine, using the same method above.

Thanks in advance for the help.

welcome to the :grafana: forum, @pablosproject

I would check out this thread. The stat panel and the Status History panels are probably what you want to use here:

https://play.grafana.org/d/Zb3f4veGk/2-stats?orgId=1

https://play.grafana.org/d/qD-rVv6Mz/6-state-timeline-and-status-history?orgId=1