Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/328.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Graphite:请帮助我解释whisper-info.py输出_Python_Monitoring_Graphite_Whisper - Fatal编程技术网

Python Graphite:请帮助我解释whisper-info.py输出

Python Graphite:请帮助我解释whisper-info.py输出,python,monitoring,graphite,whisper,Python,Monitoring,Graphite,Whisper,我一直在试图理解whisper-info.py的输出,它对我来说似乎有点神秘 目前这是我的设置: 存储模式.conf [carbon] pattern = ^carbon\. retentions = 60:90d [stats] pattern = ^stats.* retentions = 30s:6h,1min:30d,10min:360d,30min:720d,1h:1825d,1d:1825d [everything_else] pattern = .* retentions =

我一直在试图理解whisper-info.py的输出,它对我来说似乎有点神秘

目前这是我的设置:

存储模式.conf

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

[stats]
pattern = ^stats.*
retentions = 30s:6h,1min:30d,10min:360d,30min:720d,1h:1825d,1d:1825d

[everything_else]
pattern = .*
retentions = 30s:6h,1min:30d,10min:360d,30min:720d,1h:1825d,1d:1825d
[min]
pattern = \.lower$
xFilesFactor = 0.1
aggregationMethod = min

[max]
pattern = \.upper(_\d+)?$
xFilesFactor = 0.1
aggregationMethod = max

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

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

[count_legacy]
pattern = ^stats_counts.*
xFilesFactor = 0
aggregationMethod = sum

[default_average]
pattern = .*
xFilesFactor = 0.3
aggregationMethod = average
存储聚合.conf

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

[stats]
pattern = ^stats.*
retentions = 30s:6h,1min:30d,10min:360d,30min:720d,1h:1825d,1d:1825d

[everything_else]
pattern = .*
retentions = 30s:6h,1min:30d,10min:360d,30min:720d,1h:1825d,1d:1825d
[min]
pattern = \.lower$
xFilesFactor = 0.1
aggregationMethod = min

[max]
pattern = \.upper(_\d+)?$
xFilesFactor = 0.1
aggregationMethod = max

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

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

[count_legacy]
pattern = ^stats_counts.*
xFilesFactor = 0
aggregationMethod = sum

[default_average]
pattern = .*
xFilesFactor = 0.3
aggregationMethod = average
我前面有一个statsd,非常小 localConfig.js

{
graphitePort: 2003,
graphiteHost: "127.0.0.1",
port: 8125,
flushInterval: 30000,
}
现在,我向stasd发送一个数据包,使用一个全新的度量

echo "alex.foo:1|c" | nc -w1 -u 127.0.0.1 8125
这是whisper-info.py的输出:

# whisper-info.py /opt/graphite/storage/whisper/stats/alex/foo.wsp 
maxRetention: 604800
xFilesFactor: 0.300000011921
aggregationMethod: average
fileSize: 120988

Archive 0
retention: 604800
secondsPerPoint: 60
points: 10080
size: 120960
offset: 28
为什么只有一个档案,而我显然有这么多的保留设置?我的模式规则不正确吗?输出的含义是什么?大小是文件大小吗?抵消


感谢您抽出时间回答

我发现问题出在storage-schema.conf文件的语法上。我发现了这个方便的工具validate-storage-schemas.py(位于/opt/graphite/bin/),输出非常清晰

./validate-storage-schemas.py 
Loading storage-schemas configuration from default location at: '/opt/graphite/conf/storage-schemas.conf'
Section 'carbon':
  OK
Section 'stats':
  - Error: Section 'stats' contains an invalid retention definition ('30s:6h,1min:30d,10min:360d,30min:720d,1h:1825d,1d:1825d')
    Lower precision archives must cover larger time intervals than higher precision archives (archive4: 157680000 seconds, archive5: 157680000 seconds)
  OK
Section 'everything_else':
  - Error: Section 'everything_else' contains an invalid retention definition ('30s:6h,1min:30d,10min:360d,30min:720d,1h:1825d,1d:1825d')
    Lower precision archives must cover larger time intervals than higher precision archives (archive4: 157680000 seconds, archive5: 157680000 seconds)
  OK
现在,如果我对这些文件耳语一下,它们就有意义了:

root@graftwo:/opt/graphite#whisper-info.py/opt/graphite/storage/whisper/local/test/diceroll.wsp 最大保留期:17280000 xFilesFactor:0.30000011291 聚合方法:平均值 文件大小:2113528

Archive 0
retention: 21600
secondsPerPoint: 30
points: 720
size: 8640
offset: 88

Archive 1
retention: 2592000
secondsPerPoint: 60
points: 43200
size: 518400
offset: 8728

Archive 2
retention: 31104000
secondsPerPoint: 600
points: 51840
size: 622080
offset: 527128

Archive 3
retention: 62208000
secondsPerPoint: 1800
points: 34560
size: 414720
offset: 1149208

Archive 4
retention: 157680000
secondsPerPoint: 3600
points: 43800
size: 525600
offset: 1563928

Archive 5
retention: 172800000
secondsPerPoint: 86400
points: 2000
size: 24000
offset: 2089528
我仍然想知道两件事: -为什么碳缓存没有因语法错误而失败? -这种硬违约从何而来? -这是什么东西

谢谢!希望这对其他人有帮助