# Service request counts per host server

**URL:** <https://community.dynatrace.com/t/service-request-counts-per-host-server/52414>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed, services\
**Created:** [July 9, 2025, 1:33am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414 "2025-07-09T01:33:18Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![CharlesPerez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/charlesperez/32/26797_2.png) [@CharlesPerez](https://community.dynatrace.com/u/CharlesPerez)\
**Post date:** [July 9, 2025, 1:33am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/1 "2025-07-09T01:33:18Z")

</div>

Hi All,

I would like to know if it is possible to split the service request counts of a multi-hosted service, per host server.

For example: AppServer 1, AppServer 2, AppServer 3, AppServer4, with Service1 running on all four servers  
I want to create a table that will look like this

| Host | Service | Request Count |
| --- | --- | --- |
| AppServer 1 | Service1 | 56k |
| AppServer 2 | Service1 | 54k |
| AppServer 3 | Service1 | 81k |
| AppServer 4 | Service1 | 59k |

Do you know a DQL to get this?

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 9, 2025, 10:01am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/2 "2025-07-09T10:01:51Z")

</div>

Hi,

You can see that information already seeing requests:

 ![AntonPineiro_0-1752055290691.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/85856dffba06202c29000f8f4415cbb1c641adfe.png)

You can see information per instance.

Best regards

---

<div class="post-metadata">

**Author:** ![lubrman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/lubrman/32/7353_2.png) [@lubrman](https://community.dynatrace.com/u/lubrman)\
**Post date:** [July 9, 2025, 12:23pm UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/3 "2025-07-09T12:23:38Z")

</div>

Hi&nbsp;[@CharlesPerez](https://community.dynatrace.com/user/72255)

You should be able to create a tag within each server’s process. Based on that tag, it should then be possible to divide individual services. This way, you can also create the following table.

---

<div class="post-metadata">

**Author:** ![waikeat\_chan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/waikeat_chan/32/33405_2.png) [@waikeat\_chan](https://community.dynatrace.com/u/waikeat_chan)\
**Post date:** [July 10, 2025, 1:02am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/4 "2025-07-10T01:02:48Z")

</div>

I think perhaps Charles is asking&nbsp; is it possible to do it via DQL

---

<div class="post-metadata">

**Author:** ![CharlesPerez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/charlesperez/32/26797_2.png) [@CharlesPerez](https://community.dynatrace.com/u/CharlesPerez)\
**Post date:** [July 10, 2025, 1:07am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/5 "2025-07-10T01:07:51Z")

</div>

Hi AntonPineiro,

Yes, we already saw this. But client requires to see the distribution of request count per host machine.

I can do this with processes, but client wants to do it with Services.

 ![CharlesPerez_0-1752109636183.png](https://global.discourse-cdn.com/dynatrace/original/2X/7/728882b8211d7949133d58633b25809faee34e50.png)

Regards,  
Charles

---

<div class="post-metadata">

**Author:** ![CharlesPerez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/charlesperez/32/26797_2.png) [@CharlesPerez](https://community.dynatrace.com/u/CharlesPerez)\
**Post date:** [July 10, 2025, 1:17am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/6 "2025-07-10T01:17:45Z")

</div>

That is correct sir. Apologies, I was not able to mention it on my earlier inquiry.

Thank you for pointing that out&nbsp;😊

Regards,  
Charles

---

<div class="post-metadata">

**Author:** ![sia\_h](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sia\_h](https://community.dynatrace.com/u/sia_h)\
**Post date:** [July 10, 2025, 4:09am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/7 "2025-07-10T04:09:01Z")

</div>

Try this:

```markup
fetch dt.entity.process_group_instance
| fieldsAdd service.id = runs [dt.entity.service], process.name = entity.name, belongs_to
| fieldsAdd dt.entity.host = belongs_to[dt.entity.host]
| fieldsAdd dt.entity.host.name = entityAttr(dt.entity.host, "entity.name")
| expand service.id
| lookup [
timeseries sum(dt.service.request.count),
by:{
dt.entity.service, 
dt.entity.process_group 
}
], sourceField:service.id, lookupField:dt.entity.service, prefix: "metric."

```

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 10, 2025, 8:43am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/8 "2025-07-10T08:43:48Z")

</div>

Hi,

I think&nbsp;[@sia\_h](https://community.dynatrace.com/user/10479)&nbsp;has already pointing you to a solution.

Best regards

---

<div class="post-metadata">

**Author:** ![AntonPineiro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antonpineiro/32/49_2.png) [@AntonPineiro](https://community.dynatrace.com/u/AntonPineiro)\
**Post date:** [July 10, 2025, 8:46am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/9 "2025-07-10T08:46:01Z")

</div>

Hi,

I have just added DQL reference in message, and move it to DQL forum.

Best regards

---

<div class="post-metadata">

**Author:** ![CharlesPerez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/charlesperez/32/26797_2.png) [@CharlesPerez](https://community.dynatrace.com/u/CharlesPerez)\
**Post date:** [July 10, 2025, 8:57am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/10 "2025-07-10T08:57:21Z")

</div>

Hi&nbsp;[@sia\_h](https://community.dynatrace.com/user/10479)

Thank you for this! Will simulate this first on my end and see if it matches our requirements.

Hopefully this is what they are looking for&nbsp;😁.

Regards,  
Charles Perez

---

<div class="post-metadata">

**Author:** ![CharlesPerez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/charlesperez/32/26797_2.png) [@CharlesPerez](https://community.dynatrace.com/u/CharlesPerez)\
**Post date:** [July 10, 2025, 9:00am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/11 "2025-07-10T09:00:48Z")

</div>

Thank you for the assistance Sir&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)!!&nbsp;😊

---

<div class="post-metadata">

**Author:** ![CharlesPerez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/charlesperez/32/26797_2.png) [@CharlesPerez](https://community.dynatrace.com/u/CharlesPerez)\
**Post date:** [July 11, 2025, 2:30am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/12 "2025-07-11T02:30:35Z")

</div>

Hi&nbsp;[@sia\_h](https://community.dynatrace.com/user/10479),

I tried to simplify the table, but the service seems to appear Null.

 ![CharlesPerez_1-1752200948944.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/9/89136460ea68c8f1b50452e8209b7051c431e946.png)

Only the host name and process name have data.&nbsp; Would like to seek help on how I can fix this. Thank you!

Regards,  
Charles Perez

---

<div class="post-metadata">

**Author:** ![sia\_h](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@sia\_h](https://community.dynatrace.com/u/sia_h)\
**Post date:** [July 11, 2025, 3:33am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/13 "2025-07-11T03:33:09Z")

</div>

You could add

```markup
| filter isNotNull(service.id)

```

to the end of the query. Processes with a null Service Name either have no services, or had no services in the timeframe you’re looking in.

---

<div class="post-metadata">

**Author:** ![CharlesPerez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/charlesperez/32/26797_2.png) [@CharlesPerez](https://community.dynatrace.com/u/CharlesPerez)\
**Post date:** [July 11, 2025, 3:33am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/14 "2025-07-11T03:33:23Z")

</div>

Hi Everyone,

I have resolved the Query. Thank you&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp;,&nbsp;[@sia\_h](https://community.dynatrace.com/user/10479)&nbsp;,&nbsp;[@waikeat\_chan](https://community.dynatrace.com/user/36245)&nbsp;,&nbsp;[@lubrman](https://community.dynatrace.com/user/73905)&nbsp; for the assistance.

Pasting here the final DQL that I have used, and the result from the Demo Environment.

Hope this helps other engineers! 😁

DQL:

timeseries by:{dt.entity.service}, request\_count = sum(dt.service.request.count)  
| summarize by:{dt.entity.service}, `Request Count` = sum(arraySum(request\_count))  
| fieldsAdd `Service Name` = entityAttr(dt.entity.service, “entity.name”)  
| lookUp  
[  
fetch dt.entity.service  
| expand dt.entity.host=runs\_on[dt.entity.host]  
| fieldsAdd dt.entity.host.name = entityAttr(dt.entity.host, “entity.name”)  
], lookupField:id, sourceField:dt.entity.service  
| fieldsRename `Host Name` = lookup.dt.entity.host.name  
| filter isNotNull(`Host Name`)  
| fields `Host Name`, `Service Name`, `Request Count`

Result:

 ![CharlesPerez_0-1752205858109.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/4f0ef66169bca47d680d3c6ccb03ceab4cc91fcb.png)

Regards,  
Charles Perez

---

<div class="post-metadata">

**Author:** ![imrj99](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/imrj99/32/21367_2.png) [@imrj99](https://community.dynatrace.com/u/imrj99)\
**Post date:** [August 26, 2025, 2:27pm UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/15 "2025-08-26T14:27:52Z")

</div>

looking for something similar but need to aggregate or sum up all the requests count for each host (disregarding service name, not needed), so that the table would just have a single count value per server

---

<div class="post-metadata">

**Author:** ![CharlesPerez](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/charlesperez/32/26797_2.png) [@CharlesPerez](https://community.dynatrace.com/u/CharlesPerez)\
**Post date:** [November 6, 2025, 3:26am UTC](https://community.dynatrace.com/t/service-request-counts-per-host-server/52414/16 "2025-11-06T03:26:34Z")

</div>

Hi imrj99,

You can try the following:

fetch spans  
| summarize by: {host.name}, count()

This will summarize all spans or traces per host and will show the total count of requests based on the duration you have selected. Hope this helps!
