# Merging services with different ports?

**URL:** <https://community.dynatrace.com/t/merging-services-with-different-ports/21108>\
**Category:** Open Q&A\
**Tags:** services-classic\
**Created:** [December 23, 2020, 8:24am UTC](https://community.dynatrace.com/t/merging-services-with-different-ports/21108 "2020-12-23T08:24:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielbr](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@danielbr](https://community.dynatrace.com/u/danielbr)\
**Post date:** [December 23, 2020, 8:24am UTC](https://community.dynatrace.com/t/merging-services-with-different-ports/21108/1 "2020-12-23T08:24:47Z")

</div>

Hi,

In general it seems that Dynatrace likes to create a service “copy” per port that is used.

In my case I have defined a custom device for Datapower.  
Dynatrace created 5 different services, for each of the ports that are used to connect to the DP device.  
I don’t need that split…

How do i get them to be united into just one service?  
Service Merging will not list those services. Renaming the services does not unite them either.

Any ideas?

Daniel

---

<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:** [December 23, 2020, 12:43pm UTC](https://community.dynatrace.com/t/merging-services-with-different-ports/21108/2 "2020-12-23T12:43:36Z")

</div>

Services on custom devices are detected from traffic monitored by OneAgent. You should be able to achieve that using service detection rules (they are in fact opaque services).  
You just need to override to port value in your rule for those services.

See API docs here - service detection rules are configurable only using API at the moment:

> **[Service detection API](https://docs.dynatrace.com/docs/dynatrace-api/configuration-api/service-api/detection-rules)**
>
> Learn what the Dynatrace service detection rules config API offers.

I’ve done this already for different custom devices and it works well.

---

<div class="post-metadata">

**Author:** ![danielbr](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@danielbr](https://community.dynatrace.com/u/danielbr)\
**Post date:** [January 12, 2021, 12:58pm UTC](https://community.dynatrace.com/t/merging-services-with-different-ports/21108/3 "2021-01-12T12:58:57Z")

</div>

In case someone else needs it:

using this parameter eliminates the port in the service id:

“port”: {

“doNotUseForServiceId”: “true”

}
