Operation: Decouple whisper from graphite.
Method: Create a graphite function that does a date histogram facet query against elasticsearch for a given query string for the time period viewed in the current graph.
Reason: graphite has some awesome math functions. Wouldn't it be cool if we could use those on logstash results?
The screenshot below is using logstash to watch the twitter stream of keywords "iphone" "apple" and "samsung" - then I graph them each, so we get an idea of popularity. As a bonus, I also do a movingAverage() on the iphone curve to show you why this is awesome.
Just to be totally clear, this implementation does not use whisper or rrd at all. The 'logstashHits()' function simply queries elasticsearch directly and produces a proper TimeSeries that graphite can use to graph! THIS IS AMAZING.
Bonus points for graphite functions being super easy to write. I used the 'sinFunction()' as a starting point since it generates its own time series.
Result:
Hi, great function:)
but if lenght of values array is not queal "start_time-end_time/interval" i get this:
https://github.com/faja/images/blob/master/logstash_graphite/1.png
instead of:
https://github.com/faja/images/blob/master/logstash_graphite/2.png
to se my fix, please take a look at fork: https://gist.github.com/faja/5031034
greetings:)