Splunk AppDynamics

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

CommunityUser
Splunk Employee
Splunk Employee

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%",
Labels (1)
Tags (1)
0 Karma

Edward_Ferron
Explorer

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.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Developer Program!

Hey Splunk community!  We are excited to announce that Splunk is launching the Splunk Developer Program in ...

Splunkbase Year in Review 2024

Reflecting on 2024, it’s clear that innovation and collaboration have defined the journey for Splunk ...

Developer Spotlight with Brett Adams

In our third Spotlight feature, we're excited to shine a light on Brett—a Splunk consultant, innovative ...