I am using CnosDB + Grafana to collect some system info (CPU, memory) according to the doc. If everything goes well, there will be data all the time. However, if the system down, there would be NO DATA piping into the CnosDB database instance. Is there any function I could make use of to detect the NO DATA?
I tried the Grafana way and it looks good:
NoData No data has been received for the configured time window.
I would like to know the CnosDB way as I would like to script it if there is no visualization tool. The InfluxQL way is:
SELECT derivative(usage_idle) FROM CPU WHERE time > now() - 1h
If the derivative of above field is zero, it indicates that there is no change in the data, which can be an indication of NO DATA. I can then use this information in the alerting or processing logic.