Facing issues to show 2 different metrics in one chart

Hi all,

This is my first post, I hope Im putting it in the right place and adding all the information you need for helping me. :slight_smile:

Im facing some issues when Im trying to show 2 metrics in the same chart, find below some information:

I have defined 3 variables:
image

Env & Period variables will determine the Jobs that I need to query.
The Method is multi-selection and will determine the metrics I would like to see in the chart.

The metric implementation is the one you can see below:

The point here is that as the Method Variable is multiselect, I would like to see dependind on the selection, one line for each of the selection… I was trying for a lot of times but I was not able to do that… if you can help me would be appreciated.

Thanks in advance.

Regards.

Hi all,

This is my first post, I hope Im putting it in the right place and adding all the information you need for helping me. :slight_smile:

Im facing some issues when Im trying to show 2 metrics in the same chart, find below some information:

I have defined 3 variables:
image

Env & Period variables will determine the Jobs that I need to query.
The Method is multi-selection and will determine the metrics I would like to see in the chart.

The metric implementation is the one you can see below:

The chart view is this:

The point here is that as the Method Variable is multiselect, I would like to see dependind on the selection, one line for each of the selection… I was trying for a lot of times but I was not able to do that… if you can help me would be appreciated.

The error when I have more than one selection is this:

Thanks in advance.

Regards.

This should be working (I’m using Graphan 5.04 and Promentheus 2.1)

if you still getting troubles, try using the multi-select variable as repeating value, this will make a panel (graph per value)
repeatvalue

http://docs.grafana.org/reference/templating/#repeating-panels

Thanks for your answer… I tried it and it works, it is not the best implementation I wanted to do but is working… Thank you very much.

Regards.

You could use {__name__=~"^$method"}