0

I have the values like Name:"Christopher; Johnson" , "Christopher; Nolan" etc. with the firstname and lastname seperated by a semicolon from the ES datasource. I'm trying to get these names in the variable template in Grafana.

The query I tried:

{"find":"terms", "field":"Name", "query":"Name:*Christopher*"}

and the error I got is "Only word and digit characters are allowed in variable names". Doing {"find":"terms", "field":"Name", "query":"Name:*Christopher* AND NOT Name:*;*"} will filter out all the names having ";"

Is there a way to get all these variables in a query template like:

  • Christopher
  • Johnson
  • Nolan

irrespective of whether it is a firstname or a lastname.

Any help would be much appreciated.

schikkamksu
  • 75
  • 1
  • 12

2 Answers2

0

I would write the query as {"find":"terms", "field":"Name"} and then use the regex field below the query field to filter the names for the names you are looking for.

To find Christopher you could do something like /.*[Christopher].*/

Here is an example of a query that finds only clientCDIRs that have A2 in them: enter image description here

0

I know this answer is a bit late but for anyone else hitting this issue, it's referring to the variable name set. Not the variables that are returned from a query.

Name cannot contain a space