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:
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.
However, with this approach, if I have two processes, e.g., my_jar-test-123 and my_jar-testing-234 in the path, they are both shown with the same name: “my_jar-test-123,my_jar-testing-234”
…and they still end up in a single process group.
I’m trying to configure it with Declarative process grouping, but don’t see a way to extract the desired PG name from the command line arguments similar to the Delimiter from and Delimiter to in the Advanced Detection Rule or regexp in the Process Group Naming Rule.
@deni Declarative process grouping works for deep monitored processes only in recent OneAgents >1.307. Previously it was only for non-deep monitored processes.
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 - Process group detection — Dynatrace Docs
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.
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.
The processes are deep monitored and the oneagent version is 1.323.46.20251015-192739.
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?
I finally have a resolution for my case — big thanks to @MiguelKlosinski from Dynatrace Support!
Here is the summary:
1. Process Group Naming Rule - This rule runs after process groups (PGs) are created. It can be used to rename existing PGs only. It cannot be used to split process instances (PIs) into different PGs.
2. Advanced Detection Rule - My initial mistake was leaving “Ignore numbers” enabled while my pattern included digits. After disabling it, PG detection worked as expected.
Next, we configured Process instance extraction 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.