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

Create a DQL Query to fetch the names of log sources

PedroDeodato
DynaMight Pro
DynaMight Pro

Greetings!

 

Well, the post subject pretty much sums it put, but what I need is a DQL query to fetch the name of every log source present on a specific host disk.

So, for example, every log source on my environment that begins with "Disk:\Folder1\Folder2"

I have tried to do it but, as the query needed to access every log source to gather this information, the query cost was massive.

Is there any cost-efficient way of achieving this?

Thanks!

Best regards, Pedro Deodato
3 REPLIES 3

radek_jasinski
DynaMight Guru
DynaMight Guru

Hi @PedroDeodato 

It seems to me that DQL does not support any operator to directly find “all starting with”.
And it also does not allow grouping or collecting unique values in a single fetch logs query.

However, I might be wrong.

Radek

Have a nice day!

imsingh
Dynatrace Mentor
Dynatrace Mentor

Hi there

There is a DQL function which can check if a field startsWith something. Take a look at the following example:

fetch logs
| filter startsWith(log.source,"C:\\Users" )

@imsingh Thanks for the example;)

Have a nice day!

Featured Posts