DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Deep Monitoring - Hosts

Mateusbmo1
Participant

Hello Everyone,
good afternoon!


How are you?

I recently started working intensively on FinOps in Dynatrace, and I've begun automating some processes.

I created a script to replace all Full-Stack hosts with Infrastructure Monitoring–only hosts. However, to determine which hosts can be converted, I currently need a manual validation from my team.

I'm wondering if I could retrieve some of this information through logs and/or the API, as that would help automate the process.

I'll send you a screenshot to see if you might be able to help.

In short, I need to obtain the **Deep Monitoring** information for each host.

2 REPLIES 2

Mateusbmo1
Participant

Mateusbmo1_0-1785433160622.png

 

Fin_Ubels
Dynatrace Champion
Dynatrace Champion

Hey Mateusbmo,

While I'm not sure about getting that exact deep monitoring status, a method I use for determining which hosts are valuable to keep in full stack mode is looking at which ones serve services.

Using the new Smartscape this is really easy to do using DQL. The below query looks up all hosts in the environment, then looks at which ones have a relationship to a service, then prints out just a list of host IDs that are related to services.

smartscapeNodes "HOST"
| traverse "*", "SERVICE", direction:"backward"
| fields host.id = dt.traverse.history[0][id]
| dedup host.id

You could reverse the query and look at services first, then traverse to the hosts, either way works. This is not a perfect solution as it does not necessarily account for:

  • Hosts that have deep monitored processes but there is no traffic flowing through them
  • Failed injection scenarios

Hopefully this helps though!

Featured Posts