Grafana / graphite - maxSeries on #A and #B

985 views Asked by At

I've got 2 price metrics in Grafana (datasource: Graphite) showing prices of something in 2 different currencies EUR and PLN. I would like to display maxSeries of those 2 metrics, however before comparing them makes sense I need to convert currencies to the common one. I am using the currency exchange metric to divideSeries the PLN metric, converting it to EUR.

My problem is that I can't use maxSeries with 2 arguments, like maxSeries(#A,#C) in a same way as you can pass #B as an argument to divideSeries. It simply does not work correctly.

My metrics:

#A - stats.gauges.something.EUR.price.removeAbovePercentile(5)
#B - stats.gauges.currency.EURPLN
#C - stats.gauges.something.PLN.price.divideSeries(#B)
#D - maxSeries(#A,#C)        <---- desired output

When I use the maxSeries on wildcard query listing multiple metrics e.g.: stats.gauges.*.EUR.price.maxSeries() it works ok. In my example I need to do some transformations first, so I can't simply use wildcard.

How can I achieve that?

1

There are 1 answers

0
Tom Raganowicz On

I've used the Toggle Edit Mode and manually typed: maxSeries(#A,#C), but the output was incorrect, the blue line should be max, but it wasn't always max for some reason. grafana maxSeries

I had to remove the removeAbovePercentile(5) function from #A first.