Hello.Currently I’m making a dashboard to detect some device errors using error counter. That error counter is a cumulative data, so I think delta() can be a good function to detection.
But, delta value cannot show the real differences between time series, output is always little bit bigger than real defferences.Following is the query and result using grafana. When I use prometheus directly, it also similar result using 15s ~ 1m interval.Query:1. normal query: error_counter_something{job=“monitor”, device=“dev0”, serial=“xxxxxxxx”}2. delta query: delta(error_counter_something{job=“monitor”, device=“dev0”, serial=“xxxxxxxx”}[$__interval] > 0)Time Range: 2020-11-19 16:16:00 ~ 2020-11-19 16:20:00 with 15sec intervalresult16:16:15~30 raise 2 errors on device and move that error counter value from 7616 to 7618,but the delta query shows result of 3time , delta , normal2020-11-19 16:16:00, , 76162020-11-19 16:16:15, , 76162020-11-19 16:16:30, 3, 76182020-11-19 16:16:45, , 76182020-11-19 16:17:00, , 7618(keep these value until end of query time range)Am I misuse about the delta() function? I’m so pleasure If anybody told me how can I detect error count using delta() or any other way.(I’m sorry that I can’t share the detail query information and data snapshot)Thanks!
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/b26e2db7-0a67-4e13-ad3f-046caeec6a78n%40googlegroups.com.
Query:1. normal query: error_counter_something{job=“monitor”, device=“dev0”, serial=“xxxxxxxx”}2. delta query: delta(error_counter_something{job=“monitor”, device=“dev0”, serial=“xxxxxxxx”}[$__interval] > 0)Time Range: 2020-11-19 16:16:00 ~ 2020-11-19 16:20:00 with 15sec intervalresult16:16:15~30 raise 2 errors on device and move that error counter value from 7616 to 7618,but the delta query shows result of 3time , delta , normal2020-11-19 16:16:00, , 76162020-11-19 16:16:15, , 76162020-11-19 16:16:30, 3, 76182020-11-19 16:16:45, , 76182020-11-19 16:17:00, , 7618(keep these value until end of query time range)
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/f75b2007-96ed-4c66-b719-602934827cd3n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAPbKnmAMMFA3gsTAbqVC5uz%3Dp-kymL3QT31vb9G3vOhemjWCfw%40mail.gmail.com.
While that sounds like a good idea, it's going to produce less accurate results for most use cases.