On Fri, 20 Nov 2020 at 02:29, Sungup Moon <[email protected]> wrote:
> 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.
>
Delta is for gauges, it is incorrect to use it with counters. You're
probably looking for increase.
Brian
>
> 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
> interval
>
> *result*
>
> 16: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 3
>
> time , delta ,
> normal
> 2020-11-19 16:16:00, , 7616
> 2020-11-19 16:16:15, , 7616
> 2020-11-19 16:16:30, 3, 7618
> 2020-11-19 16:16:45, , 7618
> 2020-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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/b26e2db7-0a67-4e13-ad3f-046caeec6a78n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/b26e2db7-0a67-4e13-ad3f-046caeec6a78n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
Brian Brazil
www.robustperception.io
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/CAHJKeLrdMV5_wQ9D4SAXxrNO-2AOFFZ6jaFmuTeG1hi%3D4wZ3rA%40mail.gmail.com.