cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A string like "ABCDEFG" isn't allowed here ERROR when using CSV variables with DQL on dashboards v2.0

MariettaAlmeida
Organizer

hi all, 

when using a list of variables with CSV option that references hypervisors and ESXI host tags, i get this error on DQL query: 

--A string like "xxxx" isn't allowed here. Please check the autocomplete suggestions before the error for alternative options.

MariettaAlmeida_0-1725029007468.png

i've tried 2 ways of doing this, the first one launched the error mentiones above:

MariettaAlmeida_1-1725029100374.png

the second atempt shows he cpu comsuption by cluster which is the needed metric but i cant select by variable, how can i do that'

MariettaAlmeida_3-1725029527766.png

 

timeseries usage = avg(dt.cloud.vmware.hypervisor.cpu.usage), by: { dt.entity.hypervisor },
filter: { in(dt.entity.hypervisor, classicEntitySelector("type(hypervisor), tag(\"vmware:PrXXXXXXX\") ")) }
| fieldsAdd entityName(dt.entity.hypervisor), usage = arrayAvg(usage)
| sort usage desc

thank you in advance 🙂

1 REPLY 1

krzysztof_hoja
Dynatrace Champion
Dynatrace Champion

Using native DQL syntax it can be achieved this way....

I defined variable to match my demo data:

krzysztof_hoja_0-1725050188804.png

and DQL query taking this variable as input to filtering by tag looks like this:

fetch dt.entity.hypervisor
| fieldsAdd tags
| filter iAny( tags[] == concat("SYNCED_AIT:",$Cluster))

krzysztof_hoja_1-1725050286028.png

It is also possible to use concat() function together with classicEntitySelector():

fetch dt.entity.hypervisor
| fieldsAdd tags
| filter in(id, classicEntitySelector(concat("type(hypervisor), tag(\"SYNCED_AIT:",$Cluster,"\")")))

krzysztof_hoja_2-1725050545883.png

 

Featured Posts