# Separate service instances for services running across different staging environments

**URL:** <https://community.dynatrace.com/t/separate-service-instances-for-services-running-across-different-staging-environments/37346>\
**Category:** Open Q&A\
**Tags:** services-classic\
**Created:** [November 17, 2022, 6:11pm UTC](https://community.dynatrace.com/t/separate-service-instances-for-services-running-across-different-staging-environments/37346 "2022-11-17T18:11:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesD09](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jamesd09/32/24700_2.png) [@JamesD09](https://community.dynatrace.com/u/JamesD09)\
**Post date:** [November 17, 2022, 6:11pm UTC](https://community.dynatrace.com/t/separate-service-instances-for-services-running-across-different-staging-environments/37346/1 "2022-11-17T18:11:36Z")

</div>

Hi everyone

We have a service running&nbsp; which runs across 3 different staging environments eg. MODA, MODB, MODC.

When looking at the service it collates the data from across the 3 hosts it is running on.

Is there a way to separate the service and then rename them to show the environment they are running in?

 ![service instances.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/8/8868d19a8bc0de6251f02f0c37399f25d0d36d6a.png)

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [November 17, 2022, 7:39pm UTC](https://community.dynatrace.com/t/separate-service-instances-for-services-running-across-different-staging-environments/37346/2 "2022-11-17T19:39:05Z")

</div>

The best way to do this is to have a separate ‘[host group](https://www.dynatrace.com/support/help/how-to-use-dynatrace/hosts/configuration/organize-your-environment-using-host-groups)’ for each environment, which will ensure there are separate process groups and services for each environment/hostgroup.

---

<div class="post-metadata">

**Author:** ![benjamin\_mullan](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/benjamin_mullan/32/38132_2.png) [@benjamin\_mullan](https://community.dynatrace.com/u/benjamin_mullan)\
**Post date:** [November 17, 2022, 8:43pm UTC](https://community.dynatrace.com/t/separate-service-instances-for-services-running-across-different-staging-environments/37346/3 "2022-11-17T20:43:08Z")

</div>

To add. Once they are split by host group, you can then target them&nbsp;with&nbsp;[customize-service-naming](https://www.dynatrace.com/support/help/how-to-use-dynatrace/services/service-detection-and-naming/customize-service-naming)&nbsp;and change the names as needed.

---

<div class="post-metadata">

**Author:** ![richard\_guerra](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/richard_guerra/32/9592_2.png) [@richard\_guerra](https://community.dynatrace.com/u/richard_guerra)\
**Post date:** [November 18, 2022, 2:46am UTC](https://community.dynatrace.com/t/separate-service-instances-for-services-running-across-different-staging-environments/37346/4 "2022-11-18T02:46:34Z")

</div>

You can also separate the process groups by using [process group detection rules](https://www.dynatrace.com/support/help/how-to-use-dynatrace/process-groups/configuration/pg-detection). This would be needful if you had different environments on the same host.
