Reputation: 35
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
Upvotes: 2
Views: 2254
Reputation: 1
I was able to solve this problem using query_result
and regex
:
query_result(XXXXXXXX{})
/.*_identifier="([^"]*).*/
Upvotes: 0