Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphite show top 10 metrics filtered by time

I am new to Graphite and can't understand how to do this:

I have a large number of time-metrics (celery metrics) in format stats.timers.*.median

I want to show:

  1. Top N metrics with average value above X
  2. Display them on one graph with the names of metrics

Now I have averageAbove(stats.timers.*.median,50) but it displays graphs without names and renders strangely and in bad scale. Help, please! :)

like image 734
Ellochka Cannibal Avatar asked Apr 17 '14 11:04

Ellochka Cannibal


1 Answers

You will need to chain a few functions together in order to get the desired result.

limit(sortByMaxima(averageAbove(stats.timers.*.median, X)), N)

Starting the the averageAbove as the base.

The next thing you want to do is get all the metrics in order, "top-to-bottom" by using sortByMAxima.

Then you can limit the results that are rendered with the limit function.

You might not be rending the legend if you have too many metrics for the size of the graph. You can do 3 things.

  • Make the graph larger
  • Reduce the number of metrics using limit
  • Force the legend to be displayed via hideLegend
like image 114
dannyla Avatar answered Oct 21 '22 14:10

dannyla