Graphite movingAverage of sum of hitcount

759 views Asked by At

I'm trying to render a graphite chart that has the movingAverage of the sum of the hitcount of several different metrics. This target:

sum(hitcount(stats.ambrosia.flows.*.*.messages.success,"1minutes"))

works nicely:

Rendered Graphite Chart

I would expect that the movingAverage of that target:

movingAverage(sum(hitcount(stats.ambrosia.flows.*.*.messages.success,"1minutes")),15)

would work well, too:

Invalid Graphite Chart

However, I get the dreaded "No Data" image instead. Outputting JSON format doesn't provide useful info in this case either, unfortunately, returning simply [].

How can I compute the moving average of the above sum in Graphite? I've tried the following without luck as well:

sum(hitcount(movingAverage(stats.ambrosia.flows.*.*.messages.success,15),"1minutes"))

Thanks for your help!

1

There are 1 answers

0
slawek On

Not sure which graphite version you're using, but following works for me on my environment (indented for readability):

movingAverage(
  summarize(
    sumSeries(stats.counters.*.app.elasticFacade.periodUsage.reads.*.count),
    "1minutes"
  ),
  15
)