Can I customize how process groups are detected?

Dynatrace automatically detects process types such as Tomcat, JBoss, Apache web server, MongoDB, and many others. We also take technologies like Docker, Kubernetes, OpenShift, Cloud Foundry, and Azure into account. Dynatrace also recognizes when multiple processes should be included in the same process group. For Tomcat, Dynatrace uses CATALINA_HOME and CATALINA_BASE to distinguish between different Tomcat clusters. For JBoss, Dynatrace uses JBOSS_HOME and the JBoss cluster configuration. For generic Java processes Dynatrace uses the JAR file or the main class used to start the process. Learn more about how Dynatrace tracks host processes.

This approach to process detection works fine in most cases, but isn’t perfect. This is why we’ve enabled you to customize how Dynatrace detects and identifies host processes in your environment.

What does this mean for services?

Dynatrace doesn't merge services that are hosted across multiple process groups, because each process group is considered to be a logical cluster. When Dynatrace detects the "same" service in separate process groups, it treats them as separate services (e.g., one process might be used in staging and the other in production). However, if you instruct Dynatrace to merge two separate process groups into a single group, this will also result in the services on those processes being merged as well.

Adjusting detection of Java processes

Dynatrace allows you to specify Java system properties to adjust process group detection.

Go to Settings > Monitoring overview > Process group naming.

Here you create a naming rule that uses a user defined Java system property to identify a process group (i.e., a cluster of Java processes that belong together). The Java system property needs to part of the java command line to be detected by the OneAgent. It can either be an existing system property that your application already uses (e.g., three different jetty.home values for three different Solr clusters) or you can add a new system property. As long as the system property is available on the command line, Dynatrace can use it.

Optionally, you can define a second property that identifies a specific node in the cluster. This is useful if your cluster setup has specific names per node. For a detailed example, please see our Customizing process detection blog post.

Adjusting Tomcat detection

Normally CATALINA_HOME and CATALINA_BASE are two sides of the same coin and Dynatrace uses the combination to detect Tomcats and logical Tomcat clusters. In some scenarios CATALINA_BASE is used to configure different nodes of the same logical Tomcat cluster. To address this, go to Settings > Monitoring overview > Process group naming and enable the Use CATALINA_BASE to identify Tomcat cluster nodes switch. This will result in Tomcats being grouped solely on the basis of CATALINA_HOME and CATALINA_BASE representing the different nodes of that group.

Process group detection rules

Dynatrace process group detection settings also cover non-Java processes like Nginx, Apache HTTPserver, FPM/PHP, Node.js, IIS, and .NET. As with Java processes, process group detection for non-Java processes also relies on environment variables.

Note: For non-Java process, process-group detection based on environment variables requires OneAgent version 1.09 or higher.

To add a process-group detection rule

  1. Go to Settings > Monitoring overview > Process group detection.
    Any pre-existing detection rules are listed at the bottom of the page.
  2. Click the Add detection rule button.
  3. From the Select process type drop list, select the technology type of the processes you want to group.
  4. Type in the environment variable that should be used as the identifier for the process group.
  5. _(optional) _You can additionally type in an environmental variable that should be used to identify cluster nodes within a process group.
  6. Click Save.

Environment variables

The environment variables that you select to serve as process group identifiers must exist within the scope of the detected processes. Identifiers have the same effect as DT_CLUSTER_ID variables. Identifiers also serve as the default name for detected process groups.

For example, consider two nearly identical Apache HTTP server deployments that reside within the same deployment directory but on different hosts. By default, Dynatrace can't distinguish between the two deployments because they don't possess any unique characteristics that can be used for identification. Now consider the following rule:

Any Apache HTTP process that includes the environment variable MY_PG_NAME within its scope will use the content of "MY_PG_NAME" as both its identifier and its default name. In this scenario, you can have Dynatrace separately identify and name each deployment by assigning one deployment the environment variable and assigning the other deployment with

Using environment variables for Java processes

While system properties remain the preferred method for setting up process-group detection for Java processes, we've extended the new functionality to Java process-group detection as well. So, now when you set up process-group detection for Java processes, you have the option of using either Java system properties or environment variables to identify your process groups.

Set up an environment variable for IIS

To set up an environment variable in IIS version 10 or later, see Environment variables.

To set up an environment variable in IIS versions earlier than 10, see ApplicationPoolIdentity Environment variables IIS

Separating process-cluster nodes

To separate nodes of a process cluster that run on the same host, use the DT_NODE_ID environment variable. This tells Dynatrace which processes should be considered separate process group instances.