Dashboarding
Dynatrace dashboards, notebooks, and data explorer explained.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to format a DQL to accept a "*" wildcard?

tdavison76
Visitor

Hello,  I'm creating a Dashboard that shows Service and Endpoint metrics.  It first loads up every endpoint for a Service, but I have an $Endpoint variable that has a Default value of "*".  In my tile, it fails when an Endpoint isn't selected and it's using the Default value.  Could someone help me out on how I should structure the DQL to not fail on a wildcard, or if it's another route I should be taking.

Here's the DQL I am trying to use:

timeseries { sum(dt.service.request.count), value.A = sum(dt.service.request.count, scalar: true) }, filter: { matchesValue(endpoint.name, $Endpoint) } 

 

Thanks,

Tom

6 REPLIES 6

dannemca
DynaMight Guru
DynaMight Guru

Try this

timeseries { sum(dt.service.request.count), value.A = sum(dt.service.request.count, scalar: true) }, filter: { in(endpoint.name, $Endpoint) } 

Regards

Site Reliability Engineer @ Kyndryl

Hello, thank you very much for the quick response.  I tried out the DQL but unfortunately, it doesn't return anything when the wildcard is used in the Variable.

Thanks again,

Tom

sia_h
Dynatrace Champion
Dynatrace Champion

Dashboard tile

timeseries { 
sum(dt.service.request.count)
}, 
by: {
endpoint.name, 
dt.service.name
}
| filter matchesValue(dt.service.name, $Service)
| filter matchesValue(endpoint.name, $Endpoint)
| limit 5

Service Variable

smartscapeNodes SERVICE
| filter isNotNull(name)
| fields name
| limit 10

Endpoint Variable

fetch spans
| filter matchesValue(dt.service.name, $Service)
| filter isNotNull(endpoint.name)
| fields endpoint.name
| limit 5

 

Hello, thank you for the details, still getting the same error with the Dashboard Tile example you provided:

 

A string containing only the wildcard'*' isn't allowed.

 

Thanks again,

Tom

sia_h
Dynatrace Champion
Dynatrace Champion

Could you please provide your variable DQL?

wildcards are only allowed at he beginning or end not in the middle thats probably why

Featured Posts