如果我获取前一个1h的渲染(禁用缓存),我会获得所有数据点直到当前时间。这里没有聚合,每秒显示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]]}]
大。但是如果我现在渲染到前2h,现在可以看到它在5s聚合数据,最后几个点都是'null'。
... [-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]]}]
进一步挖掘,空点是指最后一次将度量标准写入磁盘上的私语文件之后的所有内容。
尝试了解常见原因..
耳语信息看起来像..
[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