Hey,
I am looking into automating the setup of the agents on .NET and JAVA clients.
Currently I am using a shell on my windows boxes to install the msi file as such:
msiexec.exe /i dynatrace-agent-4.2.0.3154.msi
So far so good, now I want to add my .net and java processes to the client using command-line options, note that I have done it manually using the interface which doesn't scale with 100s of machines.
Any idea would be appreciated.
Answer by Andreas G. ·
For .NET you could do the following
a) configure one machine using the .NET Agent configuration Tool
b) export the registry entries that the .NET Config Tool writes -> look at HKLM\Software\Wow6432Node\dynaTrace\Agent\WhiteList
c) import these registry keys on your other .NET Servers
Andi
Thanks Andi for the reply, that's exactly what I was looking for.
Put it together in a quick shell script below for future references,
Running this script you will need 2 files,
install_agent.sh |
#!/bin/bash for server in `cat production_servers.list` do scp -r dynatrace-agent-4.2.0.3154.msi exported.reg $server: echo "installing" ssh $server "msiexec.exe /i dynatrace-agent-4.2.0.3154.msi" echo "Agent is installed" ssh $server "regedit.exe /S exported.reg" echo "Registry changes are done for $server" echo "Restarting IIS" ssh $server "iisreset.exe /restart" done |
Answer by Derek A. ·
Perhaps the REST Interface might be able to help?
You certainly don't have to add an agent via the dT client. On the application server you can add the agent mapping details directly into the JVM options of a java based application such as a Tomcat application or launch the .net configuration editor and add a .net app that way.
As far as "automating" it through a command line, some java applications like a Tomcat application probably have their JVM options stored in the registry which you could manipulate via the command line. It doesn't look like the .net configuration editor has any additonal parameters associated with the dtagentconf.exe. Perhaps it would be a good feature enhancement?
JANUARY 15, 3:00 PM GMT / 10:00 AM ET