石墨不显示> 6h数据?

时间:2015-11-16 09:12:34

标签: graphite retention whisper graphite-carbon

我的配置有问题吗?我每分钟记录碳状态。它在Graphite中工作正常,但仅持续6小时。如果我选择比这更大的东西 - 我没有看到任何数据。这是我的storage-schemas.cfg

[carbon]
pattern = ^carbon\.
retentions = 10s:6h,1min:90d

[default_1min_for_1day]
pattern = .*
retentions = 10s:6h,1min:6d,10min:1800d

1 个答案:

答案 0 :(得分:0)

您是否在开始记录数据之前或之后设置了保留期?

一旦开始向数据文件写入数据,Carbon就不会自动调整数据文件的大小。因此,在更改保留策略时,必须手动调整数据文件的大小。这是通过 whisper-resize.py 脚本完成的。

Usage: whisper-resize.py path timePerPoint:timeToStore [timePerPoint:timeToStore]*

如果需要调整许多文件的大小,可以使用find命令并将输出传递给whisper-resize.py:

find /opt/graphite/storage/whisper -type f -name "*.wsp" | sudo xargs -I{} whisper-resize.py {} 30:7d