# Service duplication / Calculated metrics

**URL:** <https://community.dynatrace.com/t/service-duplication-calculated-metrics/31956>\
**Category:** Open Q&A\
**Tags:** dynatrace-managed, services-classic\
**Created:** [June 29, 2021, 2:12pm UTC](https://community.dynatrace.com/t/service-duplication-calculated-metrics/31956 "2021-06-29T14:12:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [June 29, 2021, 2:12pm UTC](https://community.dynatrace.com/t/service-duplication-calculated-metrics/31956/1 "2021-06-29T14:12:15Z")

</div>

Hello All

Short question, see the picture below

 ![Malaik_0-1624975731799.png](https://global.discourse-cdn.com/dynatrace/original/2X/9/9162d2bd15e307e0dd1403865257ae06f171e2c7.png)

All my services are duplicated with one instance stopped once the second one was activated.

this is happen when we have a new release or when ?

All my calculated metrics based on these services are KO.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 29, 2021, 3:28pm UTC](https://community.dynatrace.com/t/service-duplication-calculated-metrics/31956/2 "2021-06-29T15:28:56Z")

</div>

Some of the service properies have changed and this resulted into new services being created. Or you added the host to a host group.

To match it to the same service as before, you need to compare the differences and use the [service detection rule](https://www.dynatrace.com/support/help/dynatrace-api/configuration-api/service-api/detection-rules/). It also requires restart of the monitored process.

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [June 30, 2021, 5:54am UTC](https://community.dynatrace.com/t/service-duplication-calculated-metrics/31956/3 "2021-06-30T05:54:07Z")

</div>

Thanks&nbsp;[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;for your time.

And what is the solution, all my tiles are blank, and I dont want to have the same problem in the future.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [June 30, 2021, 7:18am UTC](https://community.dynatrace.com/t/service-duplication-calculated-metrics/31956/4 "2021-06-30T07:18:28Z")

</div>

It really depends on what changed in your services. have a look at the metadata of the service now and before the change:

 ![Julius_Loman_0-1625037300193.png](https://global.discourse-cdn.com/dynatrace/original/3X/5/9/59349878bcdaa933743d3a0d81853ad661b94fa6.png)

There will be a difference. Using the service detection rules you can override the detection.

Alternatively, you can also change the calculated service metrics using the API.&nbsp; In the UI you can’t change the service, but I guess you can do that using API.

---

<div class="post-metadata">

**Author:** ![Malaik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/malaik/32/32673_2.png) [@Malaik](https://community.dynatrace.com/u/Malaik)\
**Post date:** [July 7, 2021, 12:28pm UTC](https://community.dynatrace.com/t/service-duplication-calculated-metrics/31956/5 "2021-07-07T12:28:22Z")

</div>

Thanks a lot of man

What will be the&nbsp;the service detection rules if I want to keet the calculated metric even there is a new release, changes or other ?

Thanks

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 7, 2021, 1:39pm UTC](https://community.dynatrace.com/t/service-duplication-calculated-metrics/31956/6 "2021-07-07T13:39:21Z")

</div>

You should not have new services just by a minor change. I can’t tell what was the cause in your case. In general this will not happen unless there was a major architectural change in the application.

The Dynatrace idea is to have the same services across your application lifecycle.

With calculated metrics you can have two options:

- create the calculated metric on a single service. The metric will be created only for the service.
- or create the calculated metric on a set of services by specifying conditions such as tags, web service names, etc. Then the metric will be created **for each service matching the conditions**. You can use the service name as the dimension in charts.
