# Creating a Management Zone rule that can detect all Services under HOST

**URL:** <https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151>\
**Category:** Open Q&A\
**Tags:** aws, tagging, hosts-classic, infrastructure-monitoring\
**Created:** [October 18, 2023, 10:59am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151 "2023-10-18T10:59:45Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![abnerlusung](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@abnerlusung](https://community.dynatrace.com/u/abnerlusung)\
**Post date:** [October 18, 2023, 10:59am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/1 "2023-10-18T10:59:45Z")

</div>

Hi all,

Our team are performing installing OneAgent to EC2 instances.

After installation, it successfully integrated giving details about the EC2 instances and the Services and Processes inside.

Let’s say, we did this in three AWS Accounts, thus we have one EC2 instances on each.

The next step is to create a Management Zone for each AWS Account.

It means, MZ1 can see the Host , Services, Processes from AWS Account 1 and so on and so forth.

Our question is, how to create a Rule which can match all the Services / Processes under the HOST?

One example of Services under my HOST is SpringBoot. Is it possible for the Service to inherit the tags from the HOST?

Best Regards,

Abner

---

<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:** [October 18, 2023, 11:46am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/2 "2023-10-18T11:46:09Z")

</div>

Hi,

You have more than one way to do it but I like tagging processes under certains conditions, and turn on those flags:

 ![AntonPineiro_0-1697629410259.png](https://global.discourse-cdn.com/dynatrace/original/3X/d/c/dca7402bd61224b336bf875cd43419475cfce32e.png)

Those automatic tags would be applied to processes, hosts and services.

And you can create MZ for entitites with that tag.

You can read [best practices for tagging](https://www.dynatrace.com/support/help/shortlink/tagging-best-practices).

Best regards

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 18, 2023, 11:46am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/3 "2023-10-18T11:46:12Z")

</div>

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

Best practice is to create MZ or TAG rules for the Process Group. You can then specify that propagation to services and hosts should occur within this rule.

> **[Management-zone rules (Dynatrace Classic)](https://docs.dynatrace.com/docs/manage/identity-access-management-classic/permission-management/management-zones/management-zone-rules)**
>
> Define management-zone rules to control access to monitored entities, logs, and metrics using entity conditions, dimensional data, and entity selectors.

This is best practice because when you configure a rule per service for example, it may not always work because the service may not always be active.

Of course, additional rules may need to be added - however, in such a case as you have written this rule on Process Group should suffice.

Radek

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 18, 2023, 11:50am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/4 "2023-10-18T11:50:27Z")

</div>

We answered at the same moment xD it’s called synchro&nbsp;😂

---

<div class="post-metadata">

**Author:** ![abnerlusung](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@abnerlusung](https://community.dynatrace.com/u/abnerlusung)\
**Post date:** [October 18, 2023, 2:00pm UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/5 "2023-10-18T14:00:12Z")

</div>

Hi&nbsp;[@AntonPineiro](https://community.dynatrace.com/user/58682)&nbsp;,

May I kindly request for the link because the original one is not working.

Thanks

---

<div class="post-metadata">

**Author:** ![abnerlusung](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@abnerlusung](https://community.dynatrace.com/u/abnerlusung)\
**Post date:** [October 18, 2023, 2:04pm UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/6 "2023-10-18T14:04:46Z")

</div>

Hi&nbsp;[@radek\_jasinski](https://community.dynatrace.com/user/16832)&nbsp;,

Can you elaborate with relation to my example?

How can my Spring Boot Service can have a tagging rule relationship with my EC2 (Installed OneAgent)?

I very much appreciate your replies. Thank you so much.

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 18, 2023, 2:14pm UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/7 "2023-10-18T14:14:02Z")

</div>

> **[Best practices and recommendations for tagging](https://docs.dynatrace.com/docs/manage/tags-and-metadata/basic-concepts/best-practices-and-recommendations-for-tagging)**
>
> Learn when it's recommended to use tags that leverage auto-detected metadata, as well as best practices for enriching Dynatrace monitoring with additional metadata.

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 18, 2023, 2:18pm UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/8 "2023-10-18T14:18:00Z")

</div>

I understand that the Spring Boot service is running on the same EC2 where you installed the agent?

---

<div class="post-metadata">

**Author:** ![abnerlusung](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@abnerlusung](https://community.dynatrace.com/u/abnerlusung)\
**Post date:** [October 19, 2023, 2:44am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/9 "2023-10-19T02:44:02Z")

</div>

Yes. And When I create Management Zone Rule.

Hosts where AWS name tag equals “hostname”. It does not detect the Spring Boot Service.

So I need to add a new rule again for the Spring Boot Service.

Rule1 - For Host (Hosts where tag name = “abc”)

Rule2- For Service (Service where Detected service name = “def”)

I was expecting, Dynatrace can detect the Service under the Host. Something like:

Rule 1 - For Host, (Auto detect Service)

I hope I explained my issue clearly.

Thank you,

Abner

---

<div class="post-metadata">

**Author:** ![abnerlusung](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@abnerlusung](https://community.dynatrace.com/u/abnerlusung)\
**Post date:** [October 19, 2023, 2:48am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/10 "2023-10-19T02:48:52Z")

</div>

Just to add, when adding Monitored Entity \> Hosts. This is an option

- Apply to processes on running matching hosts

and when adding Monitored Entity \> Service. These are the options

- Apply to underlying hosts of matching services
- Apply to underlying process groups of matching services

I don’t understand why Rule Host can only apply processes and Rule Service can apply on Hosts?

Should the Rule Host can also apply for the Services?

---

<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:** [October 19, 2023, 6:56am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/11 "2023-10-19T06:56:28Z")

</div>

Hi,

You can try to tag processes where host group is XXXX and mark on those flags. Then, all hosts, processes and services with that host group would be tagged.

And then, you can create a management zone where processes, hosts and services have that tag.

Best regards

---

<div class="post-metadata">

**Author:** ![radek\_jasinski](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/radek_jasinski/32/10432_2.png) [@radek\_jasinski](https://community.dynatrace.com/u/radek_jasinski)\
**Post date:** [October 19, 2023, 7:15am UTC](https://community.dynatrace.com/t/creating-a-management-zone-rule-that-can-detect-all-services-under-host/42151/12 "2023-10-19T07:15:00Z")

</div>

Hi,

In general, Dynatrace recommends using Host-based tagging rules as little as possible. For large environments, this results in a large number of configuration variables that you have to maintain. As I mentioned focus on defining tags based on Process Groups and extend tag rule to services and hosts. Process Groups are the key building blocks of most modern web applications.

It is not possible to propagate tags from a host to a service because in our model the hosts are on the infrastructure layer.

> **[Visualize your environment through Smartscape Classic](https://docs.dynatrace.com/docs/analyze-explore-automate/smartscape-classic)**
>
> Learn how Smartscape Classic visualizes all the entities and dependencies in your environment.

Here you have a good example:&nbsp;[Define and apply tags — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/tagging#rule-examples-for-defining-automatically-applied-tags)
