Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to multiply two series lists in Grafana / Graphite?

I have data in graphite in following format:

app.service.method_*.m1_rate (rate of calls per minute)
app.service.method_*.avg_time (avg response time per minute)

I would like to get graph with total estimated time given method is running per minute. In other words - multiply rate by avg time so I can learn from one graph what calls are taking most. If I can get it going I can then limit this (I know how :) ) to top N results of such multiplication.

Neither rate itself does not give me that information (high rate of very fast calls is not a problem) nor avg time (high average time on a service called once per 5 minutes is also not a problem).

Any suggestions?

like image 407
wciesiel Avatar asked Nov 26 '22 18:11

wciesiel


1 Answers

This can be done with multiplySeriesWithWildcards

multiplySeriesWithWildcards(app.service.method_*.{m1_rate,avg_time}, 3)

like image 80
zlace Avatar answered Dec 20 '22 18:12

zlace