obfuscurity / tasseo

Live dashboard for Graphite
Other
1.53k stars 127 forks source link

Validation on Graphite Datasource Can Fail on Composite Queries #78

Open Mmmkayness opened 10 years ago

Mmmkayness commented 10 years ago

Hi, the commit 2 months ago (https://github.com/obfuscurity/tasseo/commit/fdc6d170e49790844204eb752ee7d4c5dd182d2a) to address the alignment problem when Graphite fails to find values for the requested metric has an undesirable side effect when composite functions are chained together in a query for a metric (like for example a sumSeries on 2 metrics):

Graphite does not necessarily return the parameters requested in the same order in the JSON returned and so the underscorejs find function can fail (I presume Graphite does some kind of sorting). Graphite also seems to like injecting space characters inconsistently too:

/render/?target=sumSeries(api.foo.rate,api.bar.rate)

JSON: [ { target: "sumSeries(api.bar.rate,api.foo.rate)" .... etc } ]

A temporary workaround I'm implementing at the moment is to adjust my dashboard config to use the ordering that's sent back from Graphite, but it's something worth considering, or flagging as a gotcha when working with Graphite.

Adam