为什么平均计数指标根据 Datadog 中的时间范围显示不同的结果?

发布于 2025-01-16 19:37:39 字数 813 浏览 1 评论 0原文

我在 Datadog 中配置定义监视器时遇到问题(或者也许它可以在 Prometheus 中发出警报,我不确定)。

我有一个名为 trace.servlet.request.hits 的指标,它是一个 COUNT 指标。 Datadog 向我显示该指标的间隔是 10(秒)。我希望每当该指标发生重大变化时都会收到警报。我定义的指标是 diff(avg:trace.servlet.request.hits{cluster_name:$MY_CLUSTER}.as_count())

但是,我认为配置时间范围(https://docs.datadoghq.com/dashboards/ Guide/custom_time_frames/)只会更改周期(或时间窗口),但是更改时间范围总是会显示不同的结果,因此我很难配置获取警报的阈值。

根据我的理解,COUNT 指标 (https://docs.datadoghq. com/metrics/types/?tab=count#metric-types) 只是一个时间间隔内所有值的相加,我认为这与时间范围无关。在上述情况下,一个时间间隔为 10 秒。

但是,每次更改时间范围时,我都会得到不同的指标结果。对理解原因有什么帮助吗?多谢!

I'm having trouble with configuring defining monitor in Datadog (Or maybe it can be alert in Prometheus, I'm not sure).

I have a metric named trace.servlet.request.hits, which is a COUNT metric. Datadog shows me that the interval for this metric is 10 (seconds). I wanted to receive alerts whenever drastic change happens regarding this metric. The metric I defined is diff(avg:trace.servlet.request.hits{cluster_name:$MY_CLUSTER}.as_count()).

However, I thought that configuring time frames (https://docs.datadoghq.com/dashboards/guide/custom_time_frames/) would just change the period (or time window), but changing the time frames always show different result for my metric, and thus I'm having hard time how to configure the threshold to get alerts on.

From my understanding, COUNT metric (https://docs.datadoghq.com/metrics/types/?tab=count#metric-types) is just an addition of all values in one time interval, which I thought that is independent from the time frame. In the case above, one time interval would be 10 seconds.

However, every time I change the time frame, I'm getting different result for the metric. Any help on understanding why? Thanks a lot!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

讽刺将军 2025-01-23 19:37:39

Datadog 根据所选时间间隔聚合您所看到的内容。您可以使用rollup方法进行更多控制,但仍然有强制限制以避免图表上的点多于像素。较长的间隔总是具有较小的粒度。

Datadog aggregates what you are seeing based on the selected interval. You can use the rollup method for a bit more control, but there are still enforced limits to avoid having more points on the graph than pixels. Longer intervals will always have less granularity.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文