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

This product reached the end of support date on March 31, 2021.

Automate/simplify changing .NET agent settings?

david_works
Participant

I have .NET servers with multiple agents. While the GUI is nice, we have several agents on a single server which makes changing the collector and its related port very tedious. Is there a way to automate or simplify this? Maybe a script?

2 REPLIES 2

nva_dt
Dynatrace Pro
Dynatrace Pro

Hi David,

The .NET configuration tool is a GUI to basically simplify the configuration of environment variables.

You should have a look to the Powershell scripts on Github!

https://github.com/Dynatrace/Dynatrace-Powershell

You are interested in InstallDotNETAgent.psm1

In the Enable-DotNETAgent function, you will find the commands to enable the agent on a particular process and how to set up the main variables (from line 66).

For more information, the agent documentation lists all variables and options.

https://community.dynatrace.com/community/display/...

Hope this helps,

Nic

c_schwarzbauer
Dynatrace Champion
Dynatrace Champion

as an addition to what Nic already said:

while you can use those scripts and the corresponding environment variables for the .NET agent configuration, there's also another way: the registry.

the .NET agent configuration tool actually modifies the registry which is then queried by the agents. you can also use this way e.g. via .reg files or automatically modifying the registry.

while this might be the easiest way to get the exact configuration from one machine to another, if you have to adapt the settings or add settings in an automated way, you're probably better off with the env vars.

HTH,
Christian