obfuscurity / dusk

Hotspot dashboard for Graphite
MIT License
190 stars 12 forks source link

Support use of Graphite functions #10

Open bodgit opened 11 years ago

bodgit commented 11 years ago

Currently Dusk works fine provided your metrics don't need to be transformed in any way. If you try and use any functions, then they get passed to the Graphite metric find facility and returns no matches.

As an example, I'd like to compare all non-idle CPU, something like:

sumSeriesWithWildcards(averageSeriesWithWildcards(exclude(hosts.*.cpu.*.*, "\.idle$"),3),3)

...where each metric is of the format hosts.hostname.cpu.0.system, etc.

Perhaps requires separating out the metric path, although passing that in the above example would result in far more rows than there are actual hosts.

obfuscurity commented 10 years ago

We should just need to update https://github.com/obfuscurity/dusk/blob/a321f4ed210e2240c6570d5791d8477137512e91/lib/dusk/public/js/dusk.js#L34 to be smarter about using graphite.find() with the real target name and not this.target (which contains the full metric + functions string).