【发布时间】:2017-09-21 06:56:45
【问题描述】:
如果我获取前 1 小时的渲染(禁用缓存),我会得到当前时间的所有数据点。此处未聚合,显示每秒 1 次更新。例如,
http://graphite/render?target=local.metric.path&from=-1h&format=json&cacheTimeout=0
... [-2960.12, 1505975193], [-2960.12, 1505975194], [-2960.12, 1505975195], [-2960.12, 1505975196], [-2960.12, 1505975197], [-2960.12, 1505975198], [-2960.12, 1505975199], [-2960.12, 1505975200], [-2960.12, 1505975201], [null, 1505975202]]}]
太棒了。但是如果我现在将渲染提升到之前的 2 小时,现在可以看到它在 5 秒时聚合数据,并且最后几个点都是“空”。
... [-2775.75, 1505975390], [-2667.612, 1505975395], [-2595.52, 1505975400], [-2595.52, 1505975405], [-2595.52, 1505975410], [-2595.52, 1505975415], [-2595.52, 1505975420], [-2595.52, 1505975425], [-2595.52, 1505975430], [-2595.52, 1505975435], [null, 1505975440], [null, 1505975445], [null, 1505975450], [null, 1505975455], [null, 1505975460], [null, 1505975465], [null, 1505975470], [null, 1505975475], [null, 1505975480], [null, 1505975485], [null, 1505975490], [null, 1505975495], [null, 1505975500], [null, 1505975505], [null, 1505975510], [null, 1505975515], [null, 1505975520], [null, 1505975525], [null, 1505975530], [null, 1505975535], [null, 1505975540], [null, 1505975545], [null, 1505975550], [null, 1505975555], [null, 1505975560], [null, 1505975565], [null, 1505975570], [null, 1505975575]]}]
进一步挖掘,空点都是在最后一次将指标写入磁盘上的耳语文件之后的所有点。
已尝试查看常见原因..
- 指标更新为每秒 1 次,因此与耳语文件的最大保留率一样高。
- xFilesFactor 为 0.5,但尝试通过耳语调整大小将其修改为 0,但没有任何变化。
- 我们在 CentOS 7.2 上运行来自 epel 的 graphite-web 0.9.15
耳语信息看起来像..
[root@graphite]# whisper-info mymetric.wsp
maxRetention: 157680000
xFilesFactor: 0.0
aggregationMethod: average
fileSize: 1176592
Archive 0
retention: 3600
secondsPerPoint: 1
points: 3600
size: 43200
offset: 112
Archive 1
retention: 43200
secondsPerPoint: 5
points: 8640
size: 103680
offset: 43312
...
任何想法表示赞赏。 谢谢,
更新:添加 carbon.conf 聚合/缓存设置..
[cache]
MAX_CACHE_SIZE = inf
CACHE_QUERY_INTERFACE = 0.0.0.0
CACHE_QUERY_PORT = 7002
LOG_CACHE_HITS = False
LOG_CACHE_QUEUE_SORTS = True
CACHE_WRITE_STRATEGY = sorted
[aggregator]
MAX_AGGREGATION_INTERVALS = 5
【问题讨论】:
-
提供
carbon.conf,aggregator和cache部分是最相关的。 -
添加到描述中。让我知道你是否需要更多。谢谢