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

Java Agent configuration using environment variables (official docs are not accurate)


I'm looking to configure Java Agents using environment variables. Particularly, I wish to override the automatic hostname detection on each monitored JVM. We are using AppMon 7.x with several java application monitored.

As found in the official documentation:

All items can not only be passed as connection string arguments, but also expressed as environment variables. For example, DT_LOGLEVEL is functionally similar to loglevel, but less flexible, since it applies to all components on one machine.

At a first glance, this sounds great for my use case. Except, not all parameters are correctly implemented to be issued as environment variables. For instance, I'd expect 'name' to become DT_NAME, but that's not accurate. Through trial and error, I found that I need to use DT_AGENTNAME.

My main goal is to use the overridehostname parameter with environment variables. Except, that does not work. And I have no idea which variable to use, since DT_OVERRIDEHOSTNAME does not work. In fact, no other variant of this parameter seems to work at all: DT_HOSTNAMEOVERRIDE, DT_HOSTNAME , DT_HOST, DT_OVERRIDE_HOSTNAME, DT_HOSTNAME_OVERRIDE... nope!

Did anyone get this working?

I can certainly manouver bash scripts to manipulate the agent parameters and use the classic overridehostname directly at the agent command line, but I'd rather use environment variables to make our host configuration easier to maintain.


Dynatrace Leader
Dynatrace Leader


You're right, the overridehostname parameter does not seem to be available as an Env Var, although it does work as a command line parameter. I will request a verification of this from a sourcecode level.

Julio, I confirmed with our dev team that there is no Env Var option for that parameter. Sorry.