# How work the external web request rules?

**URL:** <https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571>\
**Category:** Open Q&A\
**Tags:** services-classic, dynatrace-saas\
**Created:** [February 23, 2023, 5:49pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571 "2023-02-23T17:49:10Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![albertokirey](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@albertokirey](https://community.dynatrace.com/u/albertokirey)\
**Post date:** [February 23, 2023, 5:49pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/1 "2023-02-23T17:49:10Z")

</div>

Hello,  
I’m trying to define a new external web request rule (under Service detection).

My goal is to define an external service that collects all the requests that my application do to a specific external service.

I mean that I want that some of the requests that now I see under “Requests to public networks”, they will be under a specific service that I have to define.

I try to use the condition “Host name contains [mydomain.com](http://mydomain.com)” but I don’t see the new external service.

How do these rules work?

Thanks

Alberto

---

<div class="post-metadata">

**Author:** ![PedroDeodato](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pedrodeodato/32/32284_2.png) [@PedroDeodato](https://community.dynatrace.com/u/PedroDeodato)\
**Post date:** [February 23, 2023, 5:58pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/2 "2023-02-23T17:58:52Z")

</div>

Hey, Alberto,

Under Service Detection, you’ll find settings to detect services running on processes monitored by the OneAgent.

As you’re talking about the “Requests to Public Networks”, those are “services” running outside your organization, ergo not monitored by your OneAgents 🙂

What is, in fact, happening is that OneAgent sees your Services calling those External services and maps out all that requests to those domains mentioned on the “Requests to public networks” service.

The good news is: there is other way to achieve precisely what you need!

Just go to the “Requests to public networks” service, and click on the domain name you need to sort out:

 ![Screenshot 2023-02-23 at 17.55.57.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/0/50caa8298964e10c491b11f1fc7e0f8f3e0a1f78.png)

That gets applied as a filter, and the page is refreshed.

Then, just click on the three little dots on the upper right corner.

You’ll see “Monitor as separate service”: this is what you need, click it! 🙂

 ![Screenshot 2023-02-23 at 17.57.02.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/a/5a256a8a3c90262d2d2473ffbe973e7acfa13e6e.jpeg)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Mohamed\_Hamdy](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mohamed\_Hamdy](https://community.dynatrace.com/u/Mohamed_Hamdy)\
**Post date:** [February 23, 2023, 7:56pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/3 "2023-02-23T19:56:57Z")

</div>

Hey, Alberto,

Adding to the above useful information added by Pedro, you can create a service naming rule the same as the below screenshot:

 ![Mohamed_Hamdy_0-1677181955094.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/81e76b7e610df6a49916b0083cdc8d406e30bc2f.png)

then you can add the following entityselector to the management zone or tagging:

type(SERVICE),entityName.startsWith(“Requests to public networks”),toRelationships.calls(type(SERVICE),tag(add the tag))

---

<div class="post-metadata">

**Author:** ![albertokirey](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@albertokirey](https://community.dynatrace.com/u/albertokirey)\
**Post date:** [February 24, 2023, 5:56pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/4 "2023-02-24T17:56:55Z")

</div>

Thank you&nbsp;[@Mohamed\_Hamdy](https://community.dynatrace.com/user/4007)&nbsp;and&nbsp;[@PedroDeodato](https://community.dynatrace.com/user/40725)&nbsp;for your help.

But I don’t understand which is the meaning of the External Web Request Rules and External Web Service Rules.

When do I use them?

Bye

Alberto

---

<div class="post-metadata">

**Author:** ![Mohamed\_Hamdy](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mohamed\_Hamdy](https://community.dynatrace.com/u/Mohamed_Hamdy)\
**Post date:** [February 27, 2023, 4:19am UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/5 "2023-02-27T04:19:37Z")

</div>

Hello&nbsp;@[albertokirey](https://community.dynatrace.com/user/59990)

Those rules are related to Service Detection rules&nbsp;If the requests go to external resources and are not detected by Dynatrace, select External web request rules or External web service rules.

Dynatrace automatically detects your deployed applications monitored by OneAgent and related microservices through specific properties of your application deployment and configuration, such as the application identifier, part of the URL, or the server name. In certain cases, information available to Dynatrace might be insufficient or incorrect for high-precision service detection. Service detection rules and the related API enable you to feed Dynatrace the needed information to improve out-of-the-box detection.

for more details please check the following URLs:

> **[Configure service detection rules in Service Detection v1](https://docs.dynatrace.com/docs/observe/application-observability/services/service-detection/service-detection-v1/customize-service-detection)**
>
> Use detection rules to customize and enhance the automated detection of your services.

---

<div class="post-metadata">

**Author:** ![albertokirey](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@albertokirey](https://community.dynatrace.com/u/albertokirey)\
**Post date:** [February 27, 2023, 1:23pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/6 "2023-02-27T13:23:05Z")

</div>

Hello&nbsp;[@Mohamed\_Hamdy](https://community.dynatrace.com/user/4007)&nbsp;,

thank you for your response. I’m sorry if I continue to ask, but I’m a little bit confused. “External resources” are also the resources that are already present in the “Requests to unmonitored hosts” and “Request to public networks” What is the difference between these and the other ones?

Thanks

Alberto

---

<div class="post-metadata">

**Author:** ![Mohamed\_Hamdy](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mohamed\_Hamdy](https://community.dynatrace.com/u/Mohamed_Hamdy)\
**Post date:** [February 27, 2023, 3:03pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/7 "2023-02-27T15:03:54Z")

</div>

Hello&nbsp;@[albertokirey](https://community.dynatrace.com/user/59990)

No problem at all, to make it simple, Dynatrace groups the external services under Requests to unmonitored hosts and Requests to public networks by default, so you can create rules to separate these calls automatically instead of separating them manually.

ex. the following is an external web request rule to create separate services if the top-level domain exists, so all the detected domains under requests to unmonitored hosts & requests to public networks will now be available as external services automatically.

I hope this helps

 ![Mohamed_Hamdy_0-1677509278802.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/b/db127c8be824dca73916d0a75fedf36a74173406.png)

---

<div class="post-metadata">

**Author:** ![albertokirey](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@albertokirey](https://community.dynatrace.com/u/albertokirey)\
**Post date:** [February 28, 2023, 5:28pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/8 "2023-02-28T17:28:58Z")

</div>

Hi&nbsp;[@Mohamed\_Hamdy](https://community.dynatrace.com/user/4007)&nbsp;,

I tried but it seems to not work.

I would like to make available the following service:

 ![Screenshot_1.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/2/62a8baaca643087a1790a818aeb125600abfb9b5.png)

So, I created the following rule:

 ![Screenshot_2.png](https://global.discourse-cdn.com/dynatrace/original/3X/1/c/1c03e163ac54c9606df73780aa1710c8559c38f2.png)

 ![Screenshot_3.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d5b842ae16e88a83c51ff9ac54e837f196379b34.png)

 ![Screenshot_4.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/a/8a031ae85b845288d8410e5f0497aa54a546f55d.png)

It’s correct?

Thanks

Alberto

---

<div class="post-metadata">

**Author:** ![Mohamed\_Hamdy](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@Mohamed\_Hamdy](https://community.dynatrace.com/u/Mohamed_Hamdy)\
**Post date:** [February 28, 2023, 6:51pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/9 "2023-02-28T18:51:06Z")

</div>

Hi&nbsp;[albertokirey](https://community.dynatrace.com/user/59990),

I think this should work as I use this to monitor external services separately, you can create it with the top domain exists condition, then give it a couple of minutes and make sure that there is traffic. after that navigate to the services, and filter with external services

 ![Mohamed_Hamdy_0-1677609680809.png](https://global.discourse-cdn.com/dynatrace/original/3X/2/e/2e3843ceeb4d37d73ea87fa914068d7252b9b783.png)

if you just want to monitor only one service, I think there is no need to create a rule for that, you just need to filter it and then click on “monitor as separate service”

 ![Mohamed_Hamdy_1-1677610104331.png](https://global.discourse-cdn.com/dynatrace/original/1X/7a1ea5d29f1c9465fad738d30fd32b10f15d5416.png)

---

<div class="post-metadata">

**Author:** ![Janiceadeltoro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/janiceadeltoro/32/32339_2.png) [@Janiceadeltoro](https://community.dynatrace.com/u/Janiceadeltoro)\
**Post date:** [August 4, 2023, 1:53pm UTC](https://community.dynatrace.com/t/how-work-the-external-web-request-rules/38571/10 "2023-08-04T13:53:22Z")

</div>

Those rules are related to Service Detection rules If the requests go to external resources and are not detected by Dynatrace, select External web request rules or External web service rules.

Dynatrace automatically detects your deployed applications monitored by OneAgent and related microservices through specific properties of your application deployment and configuration, such as the application identifier, part of the URL, or the server name. In certain cases, information available to Dynatrace might be insufficient or incorrect for high-precision service detection. Service detection rules and the related API enable you to feed Dynatrace the needed information to improve out-of-the-box detection.
