Вопрос

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! :)

Это было полезно?

Решение

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
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top