I am new in DQL, and I need help to have and view metrics (CPU usage by host / Memory usage by host) in the dashboard, those hosts have an specific tag.
Therefore, I have been trying to get the metrics since days ago; however, I have not been able to do it. I was wondering if you know how to segment this by the tag and bring the metric.
I was checking many cases in Dynatrace Community and I tried those queries, and the queries work, but they mix the host.
But You have to first create a variable for Search_Host which will take your hostname and checks the hostname that is equal to resulted hostname and filters the result. You can also use contains() here to get the results matching with Search_Host Variable.
You can modify the above query to get remaining metrics and add other variables to furthur extend the query.
You can also use the entityAttr() to get a specific attribute removing the need to write out and do a full join/lookup and then cleanup any of the stuff that comes with that.