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

Timeseries of service request count sum by host

imrj99
Participant

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

 

7 REPLIES 7

Julius_Loman
DynaMight Legend
DynaMight Legend

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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

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

0-1752205858109.png

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.

Site Reliability Engineer @ Kyndryl

sweet deal, that worked perfectly! thanks

@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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

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...

@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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts