cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there a way to customize how process groups are detected?

Stefan_Hofbaue1
Inactive

What if I have multiple clusters e.g. jboss and I want to tell Dynatrace what is a separate cluster. How to handle multiple instances of the same app server on one host?

Is there a way I can influence/customize the process group detection?

14 REPLIES 14

michael_kopp
Dynatrace Pro
Dynatrace Pro

Most application servers like JBoss, Tomcat, or Glassfish are handled automatically. On generic Java processes we do detect processes that belong together based on the startup jar or startup Mainclass.

To separate processes that have the same startup jar/mainclass further one can use two environment variables to tell Dynatrace about this.

DT_CLUSTER_ID: This environment variable should be set for one specific process or set of processes. It sets the ID of a cluster processes that belong together (e.g. a cluster of java processes that belong together and host the same services). All processes found in an environment that share this id will be treated as a process group.

The result will be that Dynatrace will separate not only the processes but also services hosted by separate clusters into distinct services.

Stefan_Hofbaue1
Inactive

If I understand you correctly, there is no need to customize process group detection with app servers, unless I have them wrapped e.g. in a Tanuki wrapper?

That is correct

It's just an environment variable that you what set when starting the process, how you set this depends on how you start your process.

The value would be the name that you want to see in the Dynatrace UI.

wojciech_aleks1
Newcomer

So I'd use this when starting the application that I want to monitor? This doesn't apply to agent startup etc. Then it will require that my monitored app server is restarted so that it picks up the new env. variable, correct?

this should be a readable comment

yes that is correct

guido_deinhamm
Dynatrace Advisor
Dynatrace Advisor

Details about how to customize process grouping is now documented here: Can I customize how process groups are detected?.

jan_palic
Guide

Good day to you,

I tried to group NGinX processes, where I differ between the server and group them by the application's name. So, I decided to use environment variables

* DT_NGINX_ID and
* DT_NGINX_CLUSTER_ID.

(Ok, it is derived by AppMon Agent configuration.)

Well, these variables are set in the nginx.service configuration, so I expect this variables are set during start time of the nginx

[Unit]
Description=The nginx HTTP and reverse proxy server
After=network.target remote-fs.target nss-lookup.target


[Service]
Type=forking
PIDFile=/run/nginx.pid
DT_NGINX_ID=accobot-n15-01
DT_NGINX_CLUSTER_ID=accobot
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
KillMode=process
KillSignal=SIGQUIT
TimeoutStopSec=5
PrivateTmp=true


[Install]
WantedBy=multi-user.target

I tried to configure the process detection like in the screen shot.

What is missing or where do I have to look, whether it works or not?
I am a bit confused.

Best,
Jan

megan_bolton
Newcomer

I'm having issues making a NGINX environment variable translate to dynatrace. Any suggestions?

[Unit]
Description=nginx - high performance web server
Documentation=http://nginx.org/en/docs/
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
PIDFile=/app/nginx/run/nginx.pid
DT_NGINX_ID=DC_WW60_RMM_DEV_NGINX
ExecStartPre=/app/nginx/sbin/nginx -t -c /app/nginx/etc/nginx.conf
ExecStart=/app/nginx/sbin/nginx -c /app/nginx/etc/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target

Have you tried it without the last checkbox limiting it to Nginx at startup? The note there makes me wonder if it doesn't detect it as Nginx at startup - since your env variable specifies Nginx anyway I don't think it would be necesary regardless.

Megan, to increase the visibility of your question, I suggest posting a new one in the Dynatrace Open Q&A forum, rather than in that old forum thread.

Best regards,

Karolina

Keep calm and build Community!

dirk_loosen
Participant

I have a similar issue but with JBOSS. I wanted to resolve this by using a -Dname=auniqueprocess in the JAVA start parameters and then create a detection rule in Dynatrace that looks for the the name. I havee attached a document hereto with description of what I tried (and failed). If any of you can spare the time to have a look at what I am doing wrong, I'd appreciate it. If anyone has actually split out a JAVA process group by using a detection rule that looks for something unique on the JAVA startup parameters, please can you send me what the -D part looked like in your startup and a screenshot of your rule config...process-group-detection-issue.docx


emerson_martine
Participant

Hi,

I'm having the same issue in Weblogic.. added the -Ddt_cluster_id=domain-cluster -Ddt_node_id=node1 to the java command arguments and dynatrace is not detecting it