3

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?

enter image description here

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.

Munin
  • 1,576
  • 2
  • 19
  • [Show us](https://stackoverflow.com/help/minimal-reproducible-example) what you've written so far. Is there some reason that a polling query which compares biggest timestamp with current clock would not suit your needs? – J_H Jun 19 '23 at 03:14
  • @J_H, thx for the input. Updated the question. – Munin Jun 19 '23 at 03:36

0 Answers0