# Metric for incoming traffic by calling host or process

**URL:** <https://community.dynatrace.com/t/metric-for-incoming-traffic-by-calling-host-or-process/41949>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, network-monitoring\
**Created:** [October 5, 2023, 3:05pm UTC](https://community.dynatrace.com/t/metric-for-incoming-traffic-by-calling-host-or-process/41949 "2023-10-05T15:05:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bert\_VanderHeyd](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bert_vanderheyd/32/162_2.png) [@Bert\_VanderHeyd](https://community.dynatrace.com/u/Bert_VanderHeyd)\
**Post date:** [October 5, 2023, 3:05pm UTC](https://community.dynatrace.com/t/metric-for-incoming-traffic-by-calling-host-or-process/41949/1 "2023-10-05T15:05:33Z")

</div>

Via “Analyse Process Connections” we can see which host/process is calling our host and what volumes we are talking about. That’s great but it’s quite deep dive.

For a certain fileserver we want to keep track of the incoming traffic and where it comes from. There are a few metrics for that but none of them have a “calling host” dimension or something like that. See&nbsp;builtin:host.net.nic.trafficIn can be split by host and NIC. But that doesn’t tell where the traffic comes from. We know the data is available because we have those details via “Analyse Process Connections”.

Is this feasible? And how? For this particular service we want it on a dashboard. Maybe even create alerts when certain incoming spikes arise.

---

<div class="post-metadata">

**Author:** ![mark\_bley](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mark_bley/32/20954_2.png) [@mark\_bley](https://community.dynatrace.com/u/mark_bley)\
**Post date:** [October 6, 2023, 8:19am UTC](https://community.dynatrace.com/t/metric-for-incoming-traffic-by-calling-host-or-process/41949/2 "2023-10-06T08:19:38Z")

</div>

Hi&nbsp;[@Bert\_VanderHeyd](https://community.dynatrace.com/user/11940)&nbsp;,

you can use a more specific entitySelector in your metric query to get the calling PGIs of the PGI (for my example&nbsp;PROCESS\_GROUP\_INSTANCE-19A05BD896B3AD67)&nbsp;you want to check e.g.:&nbsp;type(process\_group\_instance),fromRelationships.isNetworkClientOf(entityId(PROCESS\_GROUP\_INSTANCE-19A05BD896B3AD67))

The :parents suffix will as well give you the host where the calling PGIs come form.

So your complete query could look like this

```markup
builtin:tech.generic.network.traffic.trafficIn:filter(and(or(in(
"dt.entity.process_group_instance",
entitySelector("type(process_group_instance),fromRelationships.isNetworkClientOf(entityId(PROCESS_GROUP_INSTANCE-19A05BD896B3AD67))")
)))):splitBy("dt.entity.process_group_instance"):sort(value(auto,descending)):limit(20):parents

```

Hope this helps.

BR,

Mark
