← Back to team overview

graphite-dev team mailing list archive

Re: [Question #231417]: Combining the results of multiple functions and graphing that combined result

 

Question #231417 on Graphite changed:
https://answers.launchpad.net/graphite/+question/231417

    Status: Open => Needs information

Dave Cameron requested more information:
Michael,

What do you mean when you say "it rewrites the target"?

I'm able to build a nearly equivalent graph on my graphite instance. My URL ends up looking like this:
http://my.graphite.com/render/?target=sum(collectd.qa.qa-001.vmem.*_file)&target=movingAverage(sum(collectd.qa.qa-001.vmem.*_file)%2C90)&target=sum(movingAverage(sum(collectd.qa.qa-001.vmem.*_file)%2C90)%2Cstdev(sumSeries(collectd.qa.qa-001.vmem.*_file)%2C90)%2Cstdev(sumSeries(collectd.qa.qa-001.vmem.*_file)%2C90))

And in the composer, the overall function for the third series is:
sum(movingAverage(sum(collectd.qa.qa-int-sis-db-001_ampaxs_net.vmem.*_file),90),stdev(sumSeries(collectd.qa.qa-int-sis-db-001_ampaxs_net.vmem.*_file),90),stdev(sumSeries(collectd.qa.qa-int-sis-db-001_ampaxs_net.vmem.*_file),90))

While researching your question I found out that sum() is an alias for
sumSeries(), so they should be interchangeable, and they do work with
output of other functions. I've been doing that a fair bit lately.

If you aren't doing this already, you can take the URL for an image from the graphite composer and paste it in to another tab. If there is some error with one of the target parameters, a detailed error message will be provided. For example, by removing one of the %2C90 sequences from the above URL, I can get the message:
TypeError at /render/
movingAverage() takes exactly 3 arguments (2 given)

along with a bunch of other less useful information.

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.