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

Alternate approach to setting env variables to separate processes

Mik
Visitor

Dynatrace is detecting multiple similar processes in host and putting them under the same process group and instance.

I used env variable "DT_NODE_ID" at host level to separate these processes, but I have to give these environment variables to each process at every reboot of linux machine.

Is there any alternate approach to this problem? The metadata like EXE path, command line args is same for these processes.

 

  

6 REPLIES 6

you can try something like add the set env variable to the bash command which running the application like 

DT_NODE_ID='123456' /bin/bash -c ./filename.sh

 

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Dynatrace Partner yourcompass.ca

So, I will have to mention this env variable everytime before starting the process right?

exactly, you can put this command within another .sh file and execute your process through it instead of running it directly

Certified Dynatrace Professional | Certified Dynatrace Services - Observability | Dynatrace Partner yourcompass.ca

islam_zidan
Champion

Hello,

You can add a custom process rule to monitor using the EXE path like the below SC. this will separate the processes.

islam_zidan_0-1707460791157.png

 

Thanks,

Islam

Dynatrace Certified Professional - Dynatrace Partner - Yourcompass.ca

Hi,

Both the processes that I want to separate have the same EXE path. The only difference being that they run on different ports. Is there a way to separate them?

Mik_0-1707715144165.png

 

PacoPorro
Dynatrace Leader
Dynatrace Leader

I'm afraid the port is not an option.
Best option is using an ENV variable.
https://docs.dynatrace.com/docs/shortlink/process-groups#env

Featured Posts