[英]Graphite returning incorrect datapoint
./statsd-client.sh 'development.com.alpha.operation.testing.rate:1|c'
然后,我嘗試查詢最近24小時的摘要:
http://example.com/render?format=json&target=summarize(stats.development.com.alpha.operation.testing.rate ,“ 24hours”,“ sum”,true)&from = -24hours&tz = UTC
我得到1個數據點,如下所示:
"datapoints": [[0.0, 1386277560]]}]
為什么我得到0.0? 甚至Graphite Composer也不顯示任何內容
我執行10次操作時期望值是“ 10”。 我做錯了什么?
storage-schemas.conf
[carbon]
pattern = ^carbon\.
retentions = 60:90d
[default_1min_for_1day]
pattern = .*
retentions = 60s:1d
請幫助我理解問題。
編輯:
按照下面的答案,我更改了存儲聚合,並在metric_file.wsp上運行whisper-info后得到以下響應。 但是我仍然在數據點中獲得“ 0.0”作為值,並且Graphite瀏覽器不顯示任何內容。
maxRetention: 86400
xFilesFactor: 0.0
aggregationMethod: sum
fileSize: 17308
Archive 0
retention: 86400
secondsPerPoint: 60
points: 1440
size: 17280
offset: 28
我還按照其他答案中的建議查看了stats_counts樹,但相同。
我的設置有什么問題。 除了以下存儲聚合中答案所建議的更改以外,我對所有內容均使用默認設置
在Whisper軟件包中,您將獲得一個腳本whisper-info.py。 在適當的指標文件上調用它-
/whisper-info.py /opt/graphite/storage/whisper/alpha/beta/charlie.wsp
你會得到像這樣的東西-
maxRetention: 31536000
xFilesFactor: 0.0
aggregationMethod: sum
fileSize: 1261468
Archive 0
retention: 31536000
secondsPerPoint: 300
points: 105120
size: 1261440
offset: 28
在這里,請確保aggregationMethod
為sum, xFilesFactor
為0.0。 很有可能不是,因為這不是石墨的默認行為。 現在創建一個正則表達式來獲取您的指標,並將其放在配置文件storage-aggregation.conf
的開頭。 這將確保新創建的指標遵循此新的聚合規則。 您可以在此處閱讀有關xFilesFactor的更多信息。
您是否嘗試過使用stats_counts
樹代替stats
? StatsD會同時填充常規計數器。 默認情況下, stats
做一些花哨的平均,這會使低強度的stat信號消失,而stats_counts
只是給您向上計數,這聽起來像您想要的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.