<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to split Java processes with the same JAR name but different command-line arguments into separate process groups in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288313#M37835</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a JAR file my_jar.jar that is started multiple times with different command line arguments. The argument I want to use to differentiate the instances is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;-Dlog4j2.configurationFile=/var/log/my_jar-xxx/log4j2.xml&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My goal is to have each unique my_jar-xxx in its own process group. Currently, I have several process instances with name my_jar.jar grouped together in a single process group.&lt;/P&gt;
&lt;P&gt;I tried using an &lt;STRONG&gt;Advanced Detection Rule&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Property:&lt;/STRONG&gt; Java Jar&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Contains:&lt;/STRONG&gt; my_jar.jar&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Delimiter from:&lt;/STRONG&gt; -Dlog4j2.configurationFile=/var/log/&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Delimiter to:&lt;/STRONG&gt; /log4j2.xml&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;and &lt;STRONG&gt;Standalone rule&lt;/STRONG&gt; selected&lt;/P&gt;
&lt;P&gt;…but it doesn’t work.&lt;/P&gt;
&lt;P&gt;I also tried defining a &lt;STRONG&gt;Process Group Naming Rule&lt;/STRONG&gt;:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{ProcessGroup:CommandLineArgs/-Dlog4j2\.configurationFile=/var/log/([^/]+?)/log4j2\.xml}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, with this approach, if I have two processes, e.g., my_jar-test-123 and my_jar-testing-234&amp;nbsp;in the path, they are both shown with the &lt;STRONG&gt;same name&lt;/STRONG&gt;: "&lt;EM&gt;my_jar-test-123,my_jar-testing-234&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;…and they still end up in a single process group.&lt;/P&gt;
&lt;P&gt;Any suggestions on what I might be doing wrong?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Regards, Deni&lt;/P&gt;
&lt;HR /&gt;</description>
    <pubDate>Tue, 30 Dec 2025 15:00:04 GMT</pubDate>
    <dc:creator>deni</dc:creator>
    <dc:date>2025-12-30T15:00:04Z</dc:date>
    <item>
      <title>How to split Java processes with the same JAR name but different command-line arguments into separate process groups</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288313#M37835</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a JAR file my_jar.jar that is started multiple times with different command line arguments. The argument I want to use to differentiate the instances is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;-Dlog4j2.configurationFile=/var/log/my_jar-xxx/log4j2.xml&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My goal is to have each unique my_jar-xxx in its own process group. Currently, I have several process instances with name my_jar.jar grouped together in a single process group.&lt;/P&gt;
&lt;P&gt;I tried using an &lt;STRONG&gt;Advanced Detection Rule&lt;/STRONG&gt;:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Property:&lt;/STRONG&gt; Java Jar&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Contains:&lt;/STRONG&gt; my_jar.jar&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Delimiter from:&lt;/STRONG&gt; -Dlog4j2.configurationFile=/var/log/&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;STRONG&gt;Delimiter to:&lt;/STRONG&gt; /log4j2.xml&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;and &lt;STRONG&gt;Standalone rule&lt;/STRONG&gt; selected&lt;/P&gt;
&lt;P&gt;…but it doesn’t work.&lt;/P&gt;
&lt;P&gt;I also tried defining a &lt;STRONG&gt;Process Group Naming Rule&lt;/STRONG&gt;:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{ProcessGroup:CommandLineArgs/-Dlog4j2\.configurationFile=/var/log/([^/]+?)/log4j2\.xml}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, with this approach, if I have two processes, e.g., my_jar-test-123 and my_jar-testing-234&amp;nbsp;in the path, they are both shown with the &lt;STRONG&gt;same name&lt;/STRONG&gt;: "&lt;EM&gt;my_jar-test-123,my_jar-testing-234&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;…and they still end up in a single process group.&lt;/P&gt;
&lt;P&gt;Any suggestions on what I might be doing wrong?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Regards, Deni&lt;/P&gt;
&lt;HR /&gt;</description>
      <pubDate>Tue, 30 Dec 2025 15:00:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288313#M37835</guid>
      <dc:creator>deni</dc:creator>
      <dc:date>2025-12-30T15:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to split java processes with same jar name, but started with different command line args in separated PG?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288329#M37840</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would try &lt;A title="Declarative process grouping" href="https://docs.dynatrace.com/docs/shortlink/declarative-grouping" target="_blank" rel="noopener"&gt;Declarative process grouping&lt;/A&gt;. Keep in mind process must be restarted to apply changes.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2025 13:55:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288329#M37840</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2025-10-22T13:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to split java processes with same jar name, but started with different command line args in separated PG?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288341#M37843</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/58682"&gt;@AntonPineiro&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thanks!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I'm trying to configure it with &lt;A title="Declarative process grouping" href="https://docs.dynatrace.com/docs/shortlink/declarative-grouping?_gl=1*1sq79zt*_gcl_aw*R0NMLjE3NTk4MzcyNjYuQ2owS0NRanc2NGpEQmhEWEFSSXNBQmtrOEo2MEp2WWFmWXVKTDYyNHZ5ampscjRneWhabXRDTldCQjNBTzNMSWxDeno3WUpmX2JoZnAzUWFBbGtZRUFMd193Y0I.*_ga*ODk0ODg4OTY3LjE3NjA0NTEyNDA.*_ga_1MEMV02JXV*czE3NjExNDQ0NzUkbzMwJGcxJHQxNzYxMTQ0NjI4JGo4JGwwJGgw" target="_blank" rel="noopener noreferrer"&gt;Declarative process grouping&lt;/A&gt;, but don't see a way to extract the desired &lt;STRONG&gt;PG name&lt;/STRONG&gt;&amp;nbsp;from the command line arguments similar to the &lt;STRONG&gt;Delimiter from&lt;/STRONG&gt; and &lt;STRONG&gt;Delimiter to&lt;/STRONG&gt;&amp;nbsp;in the &lt;STRONG&gt;Advanced Detection Rule &lt;/STRONG&gt;or regexp in the&amp;nbsp;&lt;STRONG&gt;Process Group Naming Rule&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Can you help me with that?&lt;/P&gt;&lt;P&gt;Regards, Deni&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2025 15:06:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288341#M37843</guid>
      <dc:creator>deni</dc:creator>
      <dc:date>2025-10-22T15:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to split java processes with same jar name, but started with different command line args in separated PG?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288358#M37846</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/90225"&gt;@deni&lt;/a&gt;&amp;nbsp;Declarative process grouping works for deep monitored processes only in recent OneAgents &amp;gt;1.307. Previously it was only for non-deep monitored processes.&lt;BR /&gt;&lt;BR /&gt;Anyway, it might be worth using either a custom environment variable or use the DT_CLUSTER_ID (and optionally also DT_NODE_ID) as stated here -&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/process-groups/configuration/pg-detection" target="_blank"&gt;https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/process-groups/configuration/pg-detection&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Sometimes it's much easier (and futureproof) to set it on the deployment side. You can stil rename it in Dynatrace using process group naming rules.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Oct 2025 19:27:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288358#M37846</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2025-10-22T19:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to split java processes with same jar name, but started with different command line args in separated PG?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288362#M37848</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/3364"&gt;@Julius_Loman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Yes, it would definitely be easier on the development side, but in this case the customer has around 50+ hosts, and on each host this JAR is started about 4–5 times. That’s why I’m looking for a solution like this.&lt;/P&gt;&lt;P&gt;The processes are deep monitored and the oneagent version is 1.323.46.20251015-192739.&lt;/P&gt;&lt;P&gt;I still don’t understand why both solutions I tried didn’t work — from what I can see in the documentation, both should have worked?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 06:39:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288362#M37848</guid>
      <dc:creator>deni</dc:creator>
      <dc:date>2025-10-23T06:39:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to split java processes with same jar name, but started with different command line args in separated PG?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288812#M37887</link>
      <description>&lt;P&gt;I finally have a resolution for my case — big thanks to &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/60421"&gt;@MiguelKlosinski&lt;/a&gt;&amp;nbsp;from Dynatrace Support! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the summary:&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;STRONG&gt;Process Group Naming Rule &lt;/STRONG&gt;-&amp;nbsp;This rule runs &lt;STRONG&gt;&lt;EM&gt;after&lt;/EM&gt;&lt;/STRONG&gt; process groups (PGs) are created. It can be used to &lt;STRONG&gt;rename existing PGs only&lt;/STRONG&gt;. It &lt;STRONG&gt;cannot&lt;/STRONG&gt; be used to split process instances (PIs) into different PGs.&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;STRONG&gt;Advanced Detection Rule &lt;/STRONG&gt;-&amp;nbsp;My initial mistake was leaving &lt;STRONG&gt;“Ignore numbers”&lt;/STRONG&gt; enabled while my pattern included digits. After disabling it, PG detection worked as expected.&lt;BR /&gt;Next, we configured &lt;STRONG&gt;Process instance extraction&lt;/STRONG&gt; so each PI has a unique name. This is a very important step - otherwise every PI goes into its own group, even if the extracted names are identical! We used an unique CMD parameter (the port) to differentiate instances.&lt;/P&gt;&lt;P&gt;Result now looks like this:&lt;/P&gt;&lt;P&gt;PG:&amp;nbsp;&amp;nbsp;my_jar-test-123&lt;BR /&gt;PI-1:&amp;nbsp;my_jar-test-123 (1234)&lt;BR /&gt;PI-2: my_jar-test-123 (1235)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;Hope this helps anyone facing a similar issue! &lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Oct 2025 17:15:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/How-to-split-Java-processes-with-the-same-JAR-name-but-different/m-p/288812#M37887</guid>
      <dc:creator>deni</dc:creator>
      <dc:date>2025-10-29T17:15:59Z</dc:date>
    </item>
  </channel>
</rss>

