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

Can't configure process group

gencheva
Contributor

Hi,

I'm trying to make 2 simple node js processes and add them in process group. 

This is my current setup:

2 oneagents on 2 hosts - ariel and earth.

node js source code:

#!/usr/bin/env node

setInterval(() => {
console.log('Process 1 is running...');
}, 60000);

service config files content:
[Unit]
Description=My Dummy Process
After=network.target

[Service]
Environment=NODE_GROUP=nodejs-test
ExecStart=/home/deni/test_process.js
Restart=always
User=deni
Group=deni

[Install]
WantedBy=multi-user.target

I have 4 such files:

on earth:

/etc/systemd/system/test_process_1.service
/etc/systemd/system/test_process_2.service
/etc/systemd/system/test_process_3.service

on ariel:

/etc/systemd/system/test_process_1.service

I started them via systemctl start command

I saw in the documentation that there are minimum requirements for process to be detected, but also that I can manually configure simple and advanced detection rules:

1. Process availability:

image.png

2. Simple detection rule:

gencheva_0-1751398055662.png

3. Advanced detection rule:

gencheva_1-1751398101010.png

deni@earth:~$ ps aux | grep test_process
deni 2471839 0.9 1.3 1524292 107536 ? Ssl 15:56 3:24 node /home/deni/test_process.js
deni 2519941 0.9 1.4 1451128 113156 ? Ssl 20:25 0:55 node /home/deni/test_process.js
deni 2520441 0.9 1.3 1524392 109880 ? Ssl 20:28 0:54 node /home/deni/test_process.js

deni@ariel:~$ ps aux | grep test_process
deni 185724 3.9 0.1 12203484 126772 ? Ssl 16:48 0:01 node /home/deni/test_process.js

The final result is:

1. I have 2 process groups with 1 process in each on earth:

gencheva_2-1751398150198.png

2. Nothing on ariel

 

What I don't understand is:

1. Why there are 4 started processes, but only 2 are visible?

2. Even they have the same env variable why the simple detection rule don't group them?

3. Why the one is shown as "node /home/deni/test_process.js" and the other as "/home/deni/test_process.js"

 

Thanks!

Regards, Deni

 

17 REPLIES 17

If I understood correctly, you want to see all four processes in four different process groups. If that’s correct, you can achieve it using a simple detection rule. For this, you need to use a proper environment variable to identify each process.

In my case I have added  below  variables and started the service . I could see expected result here.

export MY_PG_NAME=nodejs1
export MY_PG_INSTANCE_NAME=nodejs_1


Screenshot 2025-07-01 at 8.31.48 PM.pngScreenshot 2025-07-01 at 8.32.11 PM.png

 

here is the document : https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/process-groups/configuration/pg-de...

If you do not explicitly define the rule, Dynatrace will detect all these processes as a single process group and its instance. It will then treat the other processes as worker processes under that group.

!!! Dynatrace !!!

No, I want to see them in one group.  I followed the same document and I have simple and advanced detection rules (there are screenshots in my first post ). That is why I  have this line in service definition: "Environment=NODE_GROUP=nodejs-test" and in my simple detection rule I'm using environment variable and I have group identifier "nodejs-test".

 

deni@ariel:~$ ps aux | grep test_process
deni 185724 0.4 0.1 12203740 131128 ? Ssl Jul01 4:29 node /home/deni/test_process.js
deni 602635 0.0 0.0 9616 2880 pts/0 S+ 09:15 0:00 grep test_process
deni@ariel:~$ cat /proc/185724/environ
LANG=en_US.UTF-8LANGUAGE=en_US:enPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/binXDG_DATA_DIRS=/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/HOME=/home/deniLOGNAME=deniUSER=deniSHELL=/bin/bashINVOCATION_ID=69466538697a41d1b241d6481019bab6JOURNAL_STREAM=8:1726884SYSTEMD_EXEC_PID=185724NODE_GROUP=nodejs-test

 

deni@earth:~$ ps aux | grep test_process
deni 2471839 0.8 1.3 1524804 111480 ? Ssl Jul01 9:14 node /home/deni/test_process.js
deni 2519941 0.8 1.4 1451384 115300 ? Ssl Jul01 6:45 node /home/deni/test_process.js
deni 2520441 0.8 1.4 1524648 112892 ? Ssl Jul01 6:43 node /home/deni/test_process.js
deni 2657402 0.0 0.0 9456 2096 pts/1 S+ 09:16 0:00 grep test_process
deni@earth:~$ cat /proc/2471839/environ
LANG=en_US.UTF-8LANGUAGE=en_US:enPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binHOME=/home/deniLOGNAME=deniUSER=deniSHELL=/bin/bashINVOCATION_ID=644556a451b0474f87f57f0e85318a8cJOURNAL_STREAM=8:6499546deni@earth:~$ ps aux | grep test_process
deni 2471839 0.8 1.3 1524804 111480 ? Ssl Jul01 9:14 node /home/deni/test_process.js
deni 2519941 0.8 1.4 1451384 115300 ? Ssl Jul01 6:45 node /home/deni/test_process.js
deni 2520441 0.8 1.4 1524648 112892 ? Ssl Jul01 6:43 node /home/deni/test_process.js
deni 2657402 0.0 0.0 9456 2096 pts/1 S+ 09:16 0:00 grep test_process
deni@earth:~$ cat /proc/2471839/environ
LANG=en_US.UTF-8LANGUAGE=en_US:enPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binHOME=/home/deniLOGNAME=deniUSER=deniSHELL=/bin/bashINVOCATION_ID=644556a451b0474f87f57f0e85318a8cJOURNAL_STREAM=8:6499546NODE_GROUP=nodejs-testdeni@earth:~$
deni@earth:~$ cat /proc/2519941/environ
LANG=en_US.UTF-8LANGUAGE=en_US:enPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binHOME=/home/deniLOGNAME=deniUSER=deniSHELL=/bin/bashINVOCATION_ID=dab07f3b2e7749368af80272c7a08f50JOURNAL_STREAM=8:6573636NODE_GROUP=nodejs-testdeni@earth:~$
deni@earth:~$ cat /proc/2520441/environ
LANG=en_US.UTF-8LANGUAGE=en_US:enPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binHOME=/home/deniLOGNAME=deniUSER=deniSHELL=/bin/bashINVOCATION_ID=a80a5b374aa64daf8a018f9a3aaffa92JOURNAL_STREAM=8:6574482NODE_GROUP=nodejs-test
deni@earth:~$
deni@earth:~$ cat /proc/2519941/environ
LANG=en_US.UTF-8LANGUAGE=en_US:enPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binHOME=/home/deniLOGNAME=deniUSER=deniSHELL=/bin/bashINVOCATION_ID=dab07f3b2e7749368af80272c7a08f50JOURNAL_STREAM=8:6573636NODE_GROUP=nodejs-test
deni@earth:~$ cat /proc/2520441/environ
LANG=en_US.UTF-8LANGUAGE=en_US:enPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binHOME=/home/deniLOGNAME=deniUSER=deniSHELL=/bin/bashINVOCATION_ID=a80a5b374aa64daf8a018f9a3aaffa92JOURNAL_STREAM=8:6574482NODE_GROUP=nodejs-test

 

Hi @gencheva 

I think there is a small error in your simple detection rule. Usually, in that configuration, you should provide your environment variable key as the group identifier [ which is NODE_GROUP ], and Dynatrace will use the value of this key as the name of the process group. and app process as its workers .

Screenshot 2025-07-02 at 10.14.35 AM.png

!!! Dynatrace !!!

I tried to change it:

gencheva_0-1751472822437.png

and also removed the other two rules - advanced and availability, but the result is still the same.

Hi @gencheva ,

Have you restarted the Node.js process after making this change? I replicated the exact same scenario as you and got the expected result.

Screenshot 2025-07-02 at 12.24.39 PM.pngScreenshot 2025-07-02 at 12.24.56 PM.png

 

Started the service using  below command


export MY_PG_NAME=nodejs_test;export MY_PG_INSTANCE_NAME=nodejs_1;/bin/node /root/node-scripts/process.js &
export MY_PG_NAME=nodejs_test;export MY_PG_INSTANCE_NAME=nodejs_2;/bin/node /root/node-scripts/process.js &
export MY_PG_NAME=nodejs_test;export MY_PG_INSTANCE_NAME=nodejs_3;/bin/node /root/node-scripts/process.js &

Not sure what's going wrong 

!!! Dynatrace !!!

Thanks!

I tried to follow your steps, if I understand correct:

1. Modify my simple detection rule:

gencheva_0-1751482310946.png

2. Stop all of my started with systemctl processes.

3. Started them again as you advised:

deni@earth:~$ export MY_PG_NAME=nodejs_test;export MY_PG_INSTANCE_NAME=nodejs_1;/bin/node /home/deni/test_process.js &
[1] 2798310
deni@earth:~$ export MY_PG_NAME=nodejs_test;export MY_PG_INSTANCE_NAME=nodejs_2;/bin/node /home/deni/test_process.js &
[2] 2798366
deni@earth:~$ export MY_PG_NAME=nodejs_test;export MY_PG_INSTANCE_NAME=nodejs_3;/bin/node /home/deni/test_process.js &
[3] 2798400
deni@earth:~$ ps -aux | grep test_pr
deni 2798310 3.2 1.2 1524072 102404 pts/2 Sl 21:44 0:00 /bin/node /home/deni/test_process.js
deni 2798366 4.1 1.2 1524268 98004 pts/2 Sl 21:44 0:00 /bin/node /home/deni/test_process.js
deni 2798400 5.3 1.3 1521916 103924 pts/2 Sl 21:44 0:00 /bin/node /home/deni/test_process.js
deni 2798446 0.0 0.0 9456 2208 pts/2 S+ 21:44 0:00 grep test_pr

 

deni@ariel:~$ export MY_PG_NAME=nodejs_test;export MY_PG_INSTANCE_NAME=nodejs_4;/bin/node /home/deni/test_process.js &
[2] 169536
[1] Exit 143 /bin/node /home/deni/test_process.js
deni@ariel:~$ ps -aux | grep test_pr
deni 169536 10.9 0.1 12276956 126808 pts/0 Sl 21:43 0:01 /bin/node /home/deni/test_process.js
deni 169710 0.0 0.0 9616 2896 pts/0 S+ 21:43 0:00 grep test_pr
deni@ariel:~$ Process 1 is running...
^C
deni@ariel:~$ ps -aux | grep test_pr
deni 169536 2.1 0.1 12277212 127124 pts/0 Sl 21:43 0:02 /bin/node /home/deni/test_process.js
deni 170949 0.0 0.0 9616 2896 pts/0 S+ 21:45 0:00 grep test_pr

 

Now I see 4 processes detected all on earth:

gencheva_1-1751482459561.png

 

(I opened them one by one to check that the host is earth)

 

In the host process analysis I see:

gencheva_2-1751482545387.png

On ariel   there is nothing.

I still don't understand why there is nothing on ariel and why it can generated so different names of the process on earth?

@Akhil-JayendranFrom which screen is your screenshot? For now I only check the host -> process analysis and technologies & processes?

The environment variables might not have been passed correctly to the Node.js process.
Verify they are present using the following command:

cat /proc/<PID>/environ | tr '\0' '\n' | grep MY_

Have a nice day!

deni@earth:~$ ps -aux | grep test_pr
deni 2835174 4.4 1.2 1523952 100092 pts/1 Sl 01:10 0:00 /bin/node /home/deni/test_process.js
deni 2835232 6.0 1.3 1455276 106920 pts/1 Sl 01:10 0:00 /bin/node /home/deni/test_process.js
deni 2835267 13.0 1.2 1529760 103516 pts/1 Sl 01:10 0:00 /bin/node /home/deni/test_process.js
deni 2835293 0.0 0.0 9456 2024 pts/1 S+ 01:10 0:00 grep test_pr
deni@earth:~$ cat /proc/2835174/environ
SHELL=/bin/bashMY_PG_INSTANCE_NAME=nodejs_1LANGUAGE=en_US:enMY_PG_NAME=nodejs_testPWD=/home/deniLOGNAME=deniXDG_SESSION_TYPE=ttyMOTD_SHOWN=pamHOME=/home/deniLANG=en_US.UTF-8LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:SSH_CONNECTION=192.168.0.2 39448 192.168.0.110 22XDG_SESSION_CLASS=userTERM=xterm-256colorUSER=deniSHLVL=0XDG_SESSION_ID=2446XDG_RUNTIME_DIR=/run/user/1000SSH_CLIENT=192.168.0.2 39448 22PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/gamesDBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/busSSH_TTY=/dev/pts/1_=/bin/nodedeni@earth:~$
deni@earth:~$ cat /proc/2835232/environ
SHELL=/bin/bashMY_PG_INSTANCE_NAME=nodejs_2LANGUAGE=en_US:enMY_PG_NAME=nodejs_testPWD=/home/deniLOGNAME=deniXDG_SESSION_TYPE=ttyMOTD_SHOWN=pamHOME=/home/deniLANG=en_US.UTF-8LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:SSH_CONNECTION=192.168.0.2 39448 192.168.0.110 22XDG_SESSION_CLASS=userTERM=xterm-256colorUSER=deniSHLVL=0XDG_SESSION_ID=2446XDG_RUNTIME_DIR=/run/user/1000SSH_CLIENT=192.168.0.2 39448 22PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/gamesDBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/busSSH_TTY=/dev/pts/1_=/bin/nodedeni@earth:~$
deni@earth:~$ cat /proc/2835267/environ
SHELL=/bin/bashMY_PG_INSTANCE_NAME=nodejs_1LANGUAGE=en_US:enMY_PG_NAME=nodejs_testPWD=/home/deniLOGNAME=deniXDG_SESSION_TYPE=ttyMOTD_SHOWN=pamHOME=/home/deniLANG=en_US.UTF-8LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:SSH_CONNECTION=192.168.0.2 39448 192.168.0.110 22XDG_SESSION_CLASS=userTERM=xterm-256colorUSER=deniSHLVL=0XDG_SESSION_ID=2446XDG_RUNTIME_DIR=/run/user/1000SSH_CLIENT=192.168.0.2 39448 22PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/gamesDBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/busSSH_TTY=/dev/pts/1_=/bin/nodede

deni@ariel:~$ ps -aux | grep test_pr
deni 169536 0.5 0.1 12277212 130500 pts/0 Sl Jul02 1:07 /bin/node /home/deni/test_process.js
deni 256285 0.0 0.0 9616 2860 pts/0 S+ 01:09 0:00 grep test_pr
deni@ariel:~$ cat /proc/169536/environ
SHELL=/bin/bashSESSION_MANAGER=local/ariel:@/tmp/.ICE-unix/8734,unix/ariel:/tmp/.ICE-unix/8734QT_ACCESSIBILITY=1COLORTERM=truecolorMY_PG_INSTANCE_NAME=nodejs_4NVM_INC=/home/deni/.nvm/versions/node/v12.18.1/include/nodeXDG_MENU_PREFIX=gnome-GNOME_DESKTOP_SESSION_ID=this-is-deprecatedGTK_IM_MODULE=ibusFNM_ARCH=x64LANGUAGE=en_US:enJAVA_HOME=/usr/lib/jvm/zulu-17-amd64SSH_AUTH_SOCK=/run/user/1000/keyring/sshFNM_NODE_DIST_MIRROR=https://nodejs.org/distSDKMAN_CANDIDATES_DIR=/home/deni/.sdkman/candidatesXMODIFIERS=@im=ibusDESKTOP...MY_PG_NAME=nodejs_testGTK_MODULES=gail:atk-bridgePWD=/home/deniLOGNAME=deniXDG_SESSION_DESKTOP=gnome-xorgXDG_SESSION_TYPE=x11GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1SYSTEMD_EXEC_PID=8751XAUTHORITY=/run/user/1000/gdm/XauthorityWINDOWPATH=2GDM_LANG=en_US.UTF-8HOME=/home/deniUSERNAME=deniLANG=en_US.UTF-8LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:XDG_CURRENT_DESKTOP=GNOMEVTE_VERSION=7006SDKMAN_VERSION=5.15.0GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/262c6731_06b9_4f8c_9d1f_fa530d43cbacNVM_DIR=/home/deni/.nvmXDG_SESSION_CLASS=userTERM=xterm-256colorUSER=deniGNOME_TERMINAL_SERVICE=:1.104SDKMAN_DIR=/home/deni/.sdkmanDISPLAY=:0SHLVL=0NVM_CD_FLAGS=QT_IM_MODULE=ibusSDKMAN_CANDIDATES_API=https://api.sdkman.io/2XDG_RUNTIME_DIR=/run/user/1000MVND_HOME=/home/deni/.sdkman/candidates/mvnd/cu...


Hi @gencheva ,

Since you’ve conducted many experiments, Dynatrace has already created some process groups, which will remain in the historical data and can be ignored. At the top, there’s a time picker and please select the last 10 minutes or so and check which process group is actively delivering metrics. You can ignore all the inactive ones. after your change you should  see only one active process group and that have data. Can you confirm that ?

 

!!! Dynatrace !!!

Hi @Akhil-Jayendran ,

Yes, I'm currently learning for the Foundation Certificate and experimenting to understand how all this works in practice.

I switch the filter to last 10 minutes (the processes are as in my last comment - 3 on earth and 1 on ariel). Now I see only one process on earth:

gencheva_0-1751539443128.png

I still don't understand how Dynatrace choose this process names - till now I saw a lot - full path, full path with node in-front, js file name and now the env variable name.
I have no idea why on host ariel nothing is detected even that the configs are the same (I copy and paste them). Is there some oneagent logs or some place where I can check which rule Dynatrace use to detect the process, may be some errors ...?

Hi @gencheva 

I think this is an excellent result . You can see only one process group based on the environment variable value. Within this process group, you’ll likely see two process instances — one for Earth and one for Arial. If you’d like to see two separate process groups, there are a couple of ways to achieve that:
- Use a unique environment variable for each host process — for example, on the Earth host: MY_PG_NAME=nodejs_test_earth, and on the Arial host: MY_PG_NAME=nodejs_test_arial. This will result in two distinct process groups as shown in the screenshot.
- Alternatively, you can use a unique host group for each host. This will not only separate the Node.js processes but also group all processes by their respective hosts.


Wishing you a great learning experience! 🙂 !!

!!! Dynatrace !!!

Thank you 🙂 I'm actively learning and with your help I'm sure I'll succeed 🙂

I want to see one process group with at least 2 processes. Still don't understand why I see only one process in this process group.

Can you confirm ariel and earth are in the same hostgroup?  Process groups can't span different host groups.

I didn't assign host group to them:
deni@earth:~$ sudo /opt/dynatrace/oneagent/agent/tools/oneagentctl --get-host-group
deni@earth:~$

deni@ariel:~$ sudo oneagentctl --get-host-group
deni@ariel:~$

Hi @gencheva ,

If you follow the instructions, you should see something like this:

 

One process group:

Screenshot 2025-07-04 at 1.31.39 PM.png

 

Two process instances — one for each server

 

Screenshot 2025-07-04 at 1.32.09 PM.png

 

If you’re not seeing this on your Arial host, please make sure the OneAgent is active, and that Node.js is properly installed and running.

!!! Dynatrace !!!

Yes, this is what I'm trying to do.

I tried something else: Wrote two python scrips which open ports and should be detected  automatically by Dynatrace (without any configuration). I noticed that process names differs on two hosts - python3 on ariel and test_python.py on earth. The difference between two hosts is the Debian version:

deni@earth:~$ uname -a
Linux earth 5.10.0-1-amd64 #1 SMP Debian 5.10.4-1 (2020-12-31) x86_64 GNU/Linux

deni@ariel:~/dynatrace/easytrade$ uname -a
Linux ariel 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64 GNU/Linux

So I still don't understand how Dynatrace chooses the process names. Of course they were in 2 different groups because of the name. I fixed this by setting process name in the python script so I can see both python processes in one process group.

For me this means that onegents works as expected on both hosts and the problem is with the simple process detection or may be nodejs?
deni@ariel:~/dynatrace/easytrade$ node -v
v14.18.1

deni@earth:~$ node -v
v12.22.12
But since the process is visible on ariel with ps -aux it should running properly, so may be the problem is somewhere with its name detection? Can it be something like this? Does oneagent has some log directories where I can see some debug info on how it detects processes? May be to start it with some debug flag?

Featured Posts