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

DQL - How do I enable the ability to have the record open in 'Hosts'?

badgerfifteen
Organizer

Hi, I have made a DQL query containing disk metrics. Under the 'Host Name' column, if I navigate to either 'Open Record With' or 'Open Value with', nothing shows up. What I intend to have, is it will open up in 'Hosts' or 'Infrastructure & Operations'. Any ideas? 

6 REPLIES 6

p_devulapalli
Leader

@badgerfifteen If "dt.entity.host" is the field that you are using for Host Name you should be able to have the 'Open Record With' option enable .  Here is an example query that works for me 

timeseries avg(dt.host.disk.used.percent), by: { dt.entity.disk, dt.entity.host } 
| fieldsAdd Host = entityName(dt.entity.host), Disk = entityName(dt.entity.disk),
 Usage = arrayLast(`avg(dt.host.disk.used.percent)`)
| sort Usage desc
| limit 10

 

Phani Devulapalli

Interestingly, I have had a look at my code and this code here removes the ability to have the value open in 'Hosts'. If I comment it out, it works as expected. 

| fields Host, `Disk Name`, Utilisation, `Department`, Application

 

 

You have to have a field in the output that has the entity id. Add it at the end of your list of fields and 'Open With' will then work.

Fin_Ubels
Dynatrace Champion
Dynatrace Champion

Adding on to this, you need to have that ID, but you can also hide the ID using the visualisation options but still retain the "Open With" features allowing you to create clean and functional dashboards/reports.

Showing ID is specified in the query but hidden using options on the right:

Fin_Ubels_0-1747802060071.png

Showing "Open With" still working:

Fin_Ubels_1-1747802096143.png

 

I 'm finding that that usually works, but not always. For example:

fetch dt.davis.problems

By default, you get a bunch of options on any field and then Open with. You also get app suggestions through Open value with on field event.id field.

All as expected, but if you do

fetch dt.davis.problems
|fields event.id

Neither Open value with or Open with provide any options.

Agree, some visualizations allow you to select which fields are visible or used in the legend, however, often I want to do something more with the data, such as joining it to other table and then do summarize.  Even if you do summarize ..., by :{event.id}, that event.id is no longer openable.

or also there is no Open with on a copy of the field, for example:

fetch dt.davis.problems
|fieldsAdd event.id.copy = event.id

 

So it seems to be depending on more than just the value or string representation of a field.

Any suggestions ?

 

From memory, for "Open With" to work with a problem ID you also need to include the event.type or event.kind (something that tells DT what the ID is) in the record. So using the example you posted above it would end up something like:

fetch dt.davis.problems
|fields event.id, event.type

I think it was one of those 2 fields. Hope that helps!

Featured Posts