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

Using regex or * in .Net agent configuration (Command Line)

jiri_kurejko
Organizer

Hi,

we have encountered a .Net application which creates a process on server-side for each thick client that connects to it. 

The process is always called server.exe. In the Command Line, we can see the name of the user, their hostname and port. One user = one process.

Can we use regex or wildcard (*) in the .Net agent configuration on the level of Command Line? 

Best,

Jiri

6 REPLIES 6

You can leave it blank, every process "server.exe" will try to connect regardless of the command line arguments

.NET Agent Configuration

jiri_kurejko
Organizer

Thanks David, I think we will go with this.

The downside is the agents will be called Server.exe [1], Server.exe [2], etc. So the question is then if we can pass certain parameter from Command Line as name of the agent automatically? Say hostname, so the agent is called Server.exe [TESTPC1] or maybe even Server.exe_TESTPC1?

 

 

andreas_grabner
Dynatrace Leader
Dynatrace Leader

I have one more thought on this. I assume your processes get somehow launched by a script or some other program. What if this "launcher" sets the DT_AGENTNAME environmentvariable for your server.exe to a value like "SERVER_USER_HOST". The DT_AGENTNAME env variable can be used to overwrite the settings in .NET AGent Config tool and is often used in case you control the launch of your applications.

Just a thought!

mwigman
Newcomer

We have the same type of problem. In our case the same process is started twice but we are only interested in one of them. They have different commandlines, but they are much alike. The one that we don't want to see has some extra parameters like this:

interestingprocess.exe StartAsServer

interestingprocess.exe StartAsServer&nanny

I am only interested in the first one for monitoring. If the commandline field in the agent config tool would support regular expressions I could make a filter like "StartAsServer$" (ends like ..) to select only the first process. Please consider adding a feature like that.

Regards.

Hi Marcel,

You could use environment variables to enable or disable profiling. See

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

for more information. Check the part of environment variables.

Chris

Hi Chris,

Thanks for your quick answer. This morning I performed a couple of tests and it works. Bottomline for this solution is to define an environment variable DT_AGENTNAME when starting the process, so this variable only exists within the context of this specific process. This process will identify itself with its own unique agentname, not dependent of start parameters. Good to know that agents that come to life in that way will not be seen in the .Net agent configuration tool, but will only be visible in the Agent Overview at server side.

Thanks!