3

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!

sigpwned
  • 6,957
  • 5
  • 28
  • 48
  • can you query graphite with json output to see if there is really no data? – kamaradclimber Jun 10 '15 at 06:24
  • @kamaradclimber, I think I have. I used `&format=json` on the render endpoint, and the result to that call is `[]`, as I noted in my question. Is that what you meant? Regardless, thank you for the suggestion! – sigpwned Jun 13 '15 at 16:34

1 Answers1

2

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
)
slawek
  • 2,709
  • 1
  • 25
  • 29