【问题标题】:Graphite: recursive descent of nodes in graphs / functions?石墨:图/函数中节点的递归下降?
【发布时间】:2012-07-16 06:15:04
【问题描述】:

Graphite: sum all stats that match a pattern?的后续问题:

是否有任何 Graphite 魔法可以递归地降低节点名称?我现在知道我可以使用这样的模式:

stats.timers.api.*.200.count

...但想象一下我有以下内容:

stats.timers.api.foo.bar.200.count
stats.timers.api.baz.200.count

我想在同一张图表上查看这两个统计数据(以及所有其他任意深度的统计数据)。我尝试了以下方法:

stats.timers.api.*.200.count
stats.timers.api.**.200.count

前者只向我显示上面的“baz”示例之类的项目;后者是一个错误。

还有其他方法可以以不敏感的方式匹配指标吗?

【问题讨论】:

    标签: graphite statsd


    【解决方案1】:

    dannyla 的答案更简洁的单行版本是:

    stats.timers.api.{*,*.*,*.*.*}.200.count

    但是对您的问题的简短回答不会,递归下降节点名称没有魔法。

    【讨论】:

      【解决方案2】:

      我知道这不是您所追求的 100%,但是您可以在同一个图表上拥有多个目标。

      您可以将以下内容组合到同一张图表上,这将为您提供结果,但不是您之后的干净解决方案。

      stats.timers.api.*.200.count
      stats.timers.api.*.*.200.count
      stats.timers.api.*.*.*.200.count
      

      【讨论】:

        猜你喜欢
        • 2020-07-19
        • 1970-01-01
        • 1970-01-01
        • 2021-09-25
        • 2018-10-31
        • 1970-01-01
        • 2014-04-08
        • 2011-01-19
        • 2023-03-26
        相关资源
        最近更新 更多