1

I hope you're having a nice day.

To create a variable in Grafana for a dashboard I need to get values from multiple labels from a metric :

dbinstance_identifier & dbcluster_identifier

To get the values in my variable i use the function "label_values()", but i can only put 1 label in that function :

label_values(XXXXXXXX, dbinstance_identifier)

I would want something like :

label_values(XXXXXXXX, dbinstance_identifier | dbcluster_identifier) but it returns a parse error...

What is the best solution ?

Yours sincerely,

Arthur

A.Jean
  • 25
  • 3

1 Answers1

0

I was able to solve this problem using query_result and regex:

query_result(XXXXXXXX{})

/.*_identifier="([^"]*).*/
Tyler2P
  • 2,324
  • 26
  • 22
  • 31