# Trace a web request coming from a specific host

**URL:** <https://community.dynatrace.com/t/trace-a-web-request-coming-from-a-specific-host/39859>\
**Category:** Open Q&A\
**Tags:** hosts-classic, request-attributes\
**Created:** [May 23, 2023, 2:30am UTC](https://community.dynatrace.com/t/trace-a-web-request-coming-from-a-specific-host/39859 "2023-05-23T02:30:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sravansakkhari](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sravansakkhari](https://community.dynatrace.com/u/sravansakkhari)\
**Post date:** [May 23, 2023, 2:30am UTC](https://community.dynatrace.com/t/trace-a-web-request-coming-from-a-specific-host/39859/1 "2023-05-23T02:30:55Z")

</div>

Hi Team,

We would like to track a single web request which gets invoked from a specific host and would like to alert or create dashboards for any exceptions or abnormalities with the request.

Could you please help.

Thanks.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [May 25, 2023, 12:12pm UTC](https://community.dynatrace.com/t/trace-a-web-request-coming-from-a-specific-host/39859/2 "2023-05-25T12:12:22Z")

</div>

Can you mark that request as a key request? you can then tile that on a dashboard as well.

---

<div class="post-metadata">

**Author:** ![sravansakkhari](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sravansakkhari](https://community.dynatrace.com/u/sravansakkhari)\
**Post date:** [May 29, 2023, 11:27am UTC](https://community.dynatrace.com/t/trace-a-web-request-coming-from-a-specific-host/39859/3 "2023-05-29T11:27:21Z")

</div>

Thank you for your response.

We would like to get an alert if the call to the request is originating from a **specific host**. We are not interested if the call is originating from a different host.

As per my understanding marking a request as key request, we will be getting notified every time there is some error or abnormality, right? Can the alerts be triggered only if the call is coming from a specific host?

Thank you.

---

<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:** [May 29, 2023, 11:49am UTC](https://community.dynatrace.com/t/trace-a-web-request-coming-from-a-specific-host/39859/4 "2023-05-29T11:49:15Z")

</div>

Hi,

Maybe you can play with&nbsp;[metric selector events](https://www.dynatrace.com/support/help/shortlink/metric-events-metric-selector-events)&nbsp;to be sure you are selecting only that specific host.

Best regards

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [May 29, 2023, 5:22pm UTC](https://community.dynatrace.com/t/trace-a-web-request-coming-from-a-specific-host/39859/5 "2023-05-29T17:22:07Z")

</div>

[@sravansakkhari](https://community.dynatrace.com/user/63043),

The trickiest part is getting the restriction for a certain host. You will have to set up a request attribute, like for instance, grabbing the client IP address.

You then make the selection in an MDA, including that request attribute and the URL that you need, and validate you can see only those requests that you are interested in (this for validation purposes only), Create a metric from there, and alert every time it’s bigger than zero.

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [May 29, 2023, 5:28pm UTC](https://community.dynatrace.com/t/trace-a-web-request-coming-from-a-specific-host/39859/6 "2023-05-29T17:28:58Z")

</div>

BTW, I use this as a great detection in two clients where we detect when penetration testing is happening. As we know the IP, and it’s a fixed one, we know that maybe problems might be raised by Dynatrace.

But I’m going to get it better and follow your idea, alerting only when exceptions or bad requests happen 🤣
