【问题标题】:Graphite/Carbon not retaining data for some statistics石墨/碳未保留某些统计数据
【发布时间】:2016-10-13 10:36:54
【问题描述】:

我有一个碳/石墨堆栈,其中设置了一些非常基本的保留模式。这些保留期工作正常,除了一些统计数据 - 这些似乎只持续一周。

我的 storage-schemas.conf:

[carbon]
pattern = ^carbon\.
retentions = 60:90d

[collectd]
pattern = ^collectd.*
retentions = 10s:2d,1m:14d,5m:1y

还有我的 storage-aggregation.conf:

[min]
pattern = \.min$
xFilesFactor = 0.1
aggregationMethod = min

[max]
pattern = \.max$
xFilesFactor = 0.1
aggregationMethod = max

[sum]
pattern = \.count$
xFilesFactor = 0
aggregationMethod = sum

[default_average]
pattern = .*
xFilesFactor = 0.5
aggregationMethod = average

所有统计信息都以 collectd. 为前缀,因此保留模式是正确的。在 Grafana 中查看受影响的仪表板时,我在石墨的 cache.log 中看到以下内容:

2016 年 10 月 13 日星期四 11:25:16 :: CarbonLink 对 collectd.host_domain_com.openstack-keystone-totals.gauge-users-count 的缓存查询请求返回 0 个数据点

在受影响的 .wsp 上使用 Whisper-info.py 会显示以下内容:

maxRetention: 31536000
xFilesFactor: 0.5
aggregationMethod: average
fileSize: 1710772

Archive 0
retention: 172800
secondsPerPoint: 10
points: 17280
size: 207360
offset: 52

Archive 1
retention: 1209600
secondsPerPoint: 60
points: 20160
size: 241920
offset: 207412

Archive 2
retention: 31536000
secondsPerPoint: 300
points: 105120
size: 1261440
offset: 449332

任何人都可以提出我可能错过的任何建议吗?

【问题讨论】:

    标签: graphite collectd


    【解决方案1】:

    所以这个问题的答案来自几个问题。首先,提交的数据点名称末尾带有 -count 而不是 .count,因此默认的 [sum] 聚合应用于数据。因为我们不是每 10 秒提交一次数据(并且因为我们的 xFilesFactor 默认值为 0.5),所以数据在到达保留点时会被删除,并且因为预期数据点不到 50%,因此为 null而是存储值。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-01
      • 1970-01-01
      • 2023-03-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多