When there is no data how to put in dummy data?

Hi teams
I am currently checking the status of the VM using version 1.8.10 of influxdb and Telegraph
I want to get dummy data to be built when the VM is stopped or Telegarf is stopped and data is not collected, what do I do?
Even when it’s no data, it’s to check in Grafana

You don’t really “build” dummy data, the best you can do is use the FILL function. (probably with previous/linear/N depending on your case).
Note that data will be “filled in” based on the points available in your context. If you get 1h of data and there are 0 points, FILL(previous) will do nothing, if there is even one data point data will be filled starting from there

Also, the absence of data is itself information, I’d honestly keep the nulls as nulls

1 Like

Thank you for your answer
Now I’m using TelegarfInfluxdbGrafana to monitor the status of the process, and when the process turns off, I’m using Grafana Alerting to send Slack
However, if the VM is stopped or Telegarf is stopped, that is, if No Data is accumulated in the InfluxDB, I would like to send Slack including the contents of the influxdb query
The problem is that when you query inflxdb from grafana, whether it is fill(null) or fill(previous), if all values within the time range become no data, nothing will be searched when you query
I can’t send slacks including vm names etc so I just want to pile up dummy data on influxdb itself.
If there is another way, it doesn’t matter if you use it.

Thank you.

afaik, there is no built-in way of creating dummy data, but Grafana alerting should be able to manage null data.

Here is how I did it (a long time ago, but it should still work):

  • When fetching data for the alert, base your time range on how long the alert could run, if you want the alert to run even after 3 days, get more than 3d of data
  • Now that you have a series that “exists” in your context even after 3 days of no-data you can either FILL(0) or properly configure the alert no-data behavior
  • apply whatever logic you need (i.e. alert if LAST(IsOnline) < 0 for more than 5min)
1 Like

Sorry I didn’t get back to this sooner. I tried soon after you answered, but when I hit a wall again, I got frustrated & pushed it all aside. Then I got busy with other things.
It’s been resolved, thank you.