2017-07-07 116 views
0

我已經很好地閱讀了關於此的文檔,但我仍然不明智。 http://graphite.readthedocs.io/en/latest/config-carbon.htmlGraphite storage-aggregation.conf正則表達式範圍

如果我們有一個指標,像這樣:

/var/lib/graphite/whisper/p1/p2/account/count_num_events.wsp

有誰知道知道到底這條路徑石墨的哪一部分將存儲聚合正則表達式應用於?

我認爲這將是剛剛

「count_num_events」

,因此我可以使用正則表達式 「^計數。*」 來匹配它。還是將其應用於路徑的全部或部分?

乾杯。

回答

1

你是對的。那將是你需要的東西。但要注意的指標將使用點不斜線

p1.p2.account.count_num_events 

那麼你需要在存儲聚合是下列任何

*count_num_events 
p1.p2.*.count_num_events 
p1.*.account.count_num_events 
*.account.count_num_events 
*.count_num_events 
*count_num_events$ 
p1.p2.account.count_num_events 
+0

這並不提供答案的問題。一旦你有足夠的[聲譽](https://stackoverflow.com/help/whats-reputation),你將可以[對任何帖子發表評論](https://stackoverflow.com/help/privileges/comment);相反,[提供不需要提問者澄清的答案](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-c​​an- I-DO-代替)。 - [來自評論](/ review/low-quality-posts/16740452) –

0

我終於得到全面在此做一些測試。

感謝您的答覆Fred S我希望在做測試之前看到了答案,會有所幫助。

所以答案是石墨匹配完整的度量名稱是。分離。這對於例如度量標準文件:

/var/lib/graphite/whisper/p1/p2/account/count_num_events.wsp

是:

p1.p2。 account.count_num_events

所以最嚴格的正則表達式,你可以做的是:

^P1 \ .p2 \ .account \ .count_num_events $