cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Not a customer? Start a free trial

Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.

AppDynamics customers and established members should click the sign in button to authenticate.

NET (Agent, Installation)

How can I set the Controller's Port using Environmentvalriable?

Muralikrishna.P
New Poster

How can I set the Controller's Port using Environmentvalriable?

How can I set the Controller's Port using Environmentvalriable?

whether it will be like below.

{

"controller": {
"host": "%APPDYNAMICS.CONTROLLER.HOSTNAME%",
"port": %APDDYNAMICS.CONTROLLER.PORT%,
}
}

I don't think it's correct. Is there any way we can inject the port environment variable.

I used https://docs.appdynamics.com/display/PRO45/AppDynamicsConfig.json+File
Also the host value which I was reading from the Environment variable, whether it's correct?

"host": "%APPDYNAMICS.CONTROLLER.HOSTNAME%",

 

Tags (1)
By replying you agree to the Terms and Conditions of the AppDynamics Community.
How can I set the Controller's Port using Environmentvalriable?
1 REPLY 1
Edward.Ferron
AppDynamics Team

You can set the environment variable APPDYNAMICS_CONTROLLER_HOST_NAME in the Environment variables of the machine (or process) like any other environment variable. This will override the JSON values that are set.

 

Linux
export APPDYNAMICS_CONTROLLER_HOST_NAME=yourcontroller

Windows

setx APPDYNAMICS_CONTROLLER_HOST_NAME=yourcontroller

Note: setx is part of Windows 2008 and higher and will take effect in new sessions / command prompts. It is persistant unlike the set command.