2013-03-06 85 views
4

我遇到問題,stats_counts whipser保存的指標。StatsD和Graphite問題與stats_counts指標

在我的應用程序中,我在同一時間發射了兩種指標:計數器增量+時間。 當我比較具體的指標圖:stats_counts +「計數」的計時器我約4小時獲得相同的結果,但當看更大的時期 - 比如12小時,我可以看到很大的差異。

我發現這個職位:Tracking metrics using StatsD (via etsy) and Graphite, graphite graph doesn't seem to be graphing all the data 但它沒有幫助我。

在我看來,這是一個配置問題,但我不明白是什麼問題。

這是我的配置文件的樣子:

存儲schemas.conf:

[stats] 
priority = 110 
pattern = ^stats\..* 
retentions = 10s:6h,1m:7d,10m:1y 

[stats_counts] 
priority = 110 
pattern = ^stats_counts\..* 
retentions = 10s:6h,1m:7d,10m:1y 

存儲aggregation.conf:

[min] 
pattern = \.min$ 
xFilesFactor = 0.1 
aggregationMethod = min 

[max] 
pattern = \.max$ 
xFilesFactor = 0.1 
aggregationMethod = max 

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

[stats_counts] 
pattern = ^stats_counts\. 
xFilesFactor = 0 
aggregationMethod = sum 

[default_average] 
pattern = .* 
xFilesFactor = 0.3 
aggregationMethod = average 

正如你所看到的我有用於聚合的「stats_counts」規則,但它看起來不是很好,沒有任何想法我錯過了什麼?也許我寫的正則表達式的語法不好:^ stats_counts。

回答

2

問題是,當我在碳緩存過程中調用「停止」時,爲了用新配置引用它的內存,它並沒有真正停止,因此配置是舊的。

因此,上述配置沒有任何問題。只要確保你的配置實際上是由碳吸收的過程 - 使用whisper-info.py命令:

whisper-info.py your_metric_file_name.wsp

注意,似乎有一個問題,與碳緩存停止: https://answers.launchpad.net/graphite/+question/135957

+0

Tomer,你是如何得到碳更新的?嘗試停止緩存(sudo ./carbon-cache.py停止)並重新啓動,但保留不更新。謝謝 – Noel 2013-04-26 21:57:55

+0

查看https://answers.launchpad.net/graphite/+question/135957使用「stop」命令不一定會殺死碳...我用kill命令...另外,你是否知道你需要刪除舊創建的wsp文件?否則它不適合你。 – 2013-04-27 18:17:28