使用长持续时间时,Graphite 无法正确绘制值?

标签 graphite

我正在尝试使用 statsd 和 Graphite 绘制数据。我有一个简单的计数器,我将它加 1,然后当我绘制一天中计数器的值时,我看到像 0.09 这样的奇怪值作为我的图中的峰值(参见 http://i.stack.imgur.com/o4gmz.png)

该图应该显示 2 个登录,但它显示的是 0.09。如果我将时间刻度从 1 天更改为最后 15 分钟,那么它会正确显示两次登录(请参阅 http://i.stack.imgur.com/23vDJ.png )

我已经在 storage-schemas.conf 中以 10 秒为增量设置了我最好的保留:

retentions = 10s:7d,1m:21d,24h:5y

我已经设置了我的 storage-aggregation.conf 文件来总结计数:
[sum]
pattern = \.count$
xFilesFactor = 0
aggregationMethod = sum

(而且,在你问之前,是的;这是一个 .count)。

如果我用 &rawData=true 尝试我的 URL然后在任何一种情况下我都会看到一些 None s, 一些 0.0 s 和一对 1.0 s 由一些 0.0 分隔s。我从来没有看到这些以某种方式显示在图表上的小数值。所以......这是一个错误吗?难道我做错了什么?

最佳答案

还有合并来自 如果没有足够的像素来准确绘制所有内容,该函数会告诉 Graphite 该怎么做。默认情况下,它使用“avg”函数,因此当时间范围更大时会产生奇怪的结果。 Here文档摘录:

When a graph is drawn where width of the graph size in pixels is smaller than the number of datapoints to be graphed, Graphite consolidates the values to to prevent line overlap. The consolidateBy() function changes the consolidation function from the default of ‘average’ to one of ‘sum’, ‘max’, or ‘min’. This is especially useful in sales graphs, where fractional values make no sense and a ‘sum’ of consolidated values is appropriate.



另一个可能有用的函数是 命中数 .摘自 here为什么它有用:

This function is like summarize(), except that it compensates automatically for different time scales (so that a similar graph results from using either fine-grained or coarse-grained records) and handles rarely-occurring events gracefully.



我花了一些时间摸不着头脑,为什么当我的聚合规则为最大值时,我的计数器的时间范围会超过几个小时。这非常令人困惑,尤其是在开始时,当您使用单个计数器来查看是否一切正常时。检查 rawData 是调试健全性检查的好方法;)

关于使用长持续时间时,Graphite 无法正确绘制值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13019126/

相关文章:

python - 从 python 客户端发送带有标签的 statsD 指标

Graphite 通配符百分比计算

graphite - 可以将 Graphite (耳语)指标重命名吗?

java - Dropwizard Graphite 上的度量聚合问题

graphite - Whisper 不显示旧数据

node.js - Graphite 不绘制 statsd 请求

performance - 使用 Graphite+Grafana 测量服务的正常运行时间

ruby-on-rails - 不接受从 Heroku 上的 Rails 发送到 HostedGraphite 的 UDP 数据包

使用 Statsd 和 Graphite 进行 Linux 进程监控

django - "graphite"用户身份认证失败