26 Aug 2025
04:41 PM
- last edited on
28 Aug 2025
04:34 PM
by
Ana_Kuzmenchuk
I would like to have a timeseries that includes the sum of total requests count by host, very similar to the post below, but w/o the service name, and the count summed up by hosts (i will pull in hosts from a mgmtzone variable)
https://community.dynatrace.com/t5/DQL/Service-request-counts-per-host-server/td-p/281087
Solved! Go to Solution.
26 Aug 2025 05:17 PM - edited 26 Aug 2025 07:05 PM
You can't do this with the built-in service metrics (service metrics are already aggregated and do not contain host dimension), but you can grab it from spans:
fetch spans
| filter span.kind=="server"
| makeTimeseries count(), by:{host.name}
or create your own metric in OpenPipeline for spans.
Just take into account that not all spans must be captured (sampling / adaptive traffic management), so you might see lower values than the actual count.
26 Aug 2025 07:46 PM
so there is no way i could sum up the counts for each unique host? am afraid with spans am going to get a lot of other things than just specific service request counts
what am looking for is exactly like this screenshot below, but removing the service name and just sum the service request counts at the unique host level
26 Aug 2025 08:07 PM
just add this at the end of this current DQL you have for this table
|summarize sum(Request Count), by:{Host Name}
replacing the respective Request Count and Host Name fields by the one you have in your query.
26 Aug 2025 08:21 PM
sweet deal, that worked perfectly! thanks
26 Aug 2025 09:54 PM
@imrj99 If you grabbed the DQL from the referenced thread, then this will work only for services which have one instance (one host). There is no way of doing from dt.service.request.count metric for process groups which have more than one instance.
27 Aug 2025 01:13 PM
yup you are correct indeed, I noticed that shortly after, only a few hosts are coming up on the query and its for exactly the reason you mentioned. so spans must be the only way then...
27 Aug 2025 01:48 PM
@imrj99 spans are the way if you need to see it for some analysis. For dashboards, create a metric in OpenPipeline span pipeline to calculate it.