【问题标题】:Graphite storage-aggregation.conf regex scope石墨 storage-aggregation.conf 正则表达式范围
【发布时间】:2017-07-07 08:42:28
【问题描述】:

我已经很好地阅读了这方面的文档,但我仍然不明智。 http://graphite.readthedocs.io/en/latest/config-carbon.html

如果我们有这样的指标:

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

有谁确切地知道石墨将存储聚合正则表达式应用到这条路径的哪一部分?

我认为它只是

“count_num_events”

因此我可以使用正则表达式“^count.*”来匹配它。还是将其应用于路径的全部或部分其余部分?

干杯。

【问题讨论】:

    标签: metrics graphite graphite-carbon


    【解决方案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
    

    【讨论】:

      【解决方案2】:

      我终于有时间对此进行一些测试了。

      感谢 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$

      【讨论】:

        猜你喜欢
        • 2021-07-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-10-27
        相关资源
        最近更新 更多