I am sending some tag values via telegraf as hostname (PC Name), status (Online) to InfluxDB.
If there are 2 PCs running Telegraf to send this data and I stop Telegraf service there is only 1 PC that is writing “PC2”, “Online” to the database now. I want to show the status on Grafana using a query that returns to me the following use case:
If in the last 1 hour, I do not receive any data from PC1, the query returns to me that PC1 is Offline, and as PC2 is still sending me data, I receive Online in the query result. The query result should be group by host. In this case PC1 is not making any entry in the database.
@Innovation_Lab,
Alternatively you could look into using the execd processor plugin to add the offline status when you need it.
I’d probbaly suggest this.