cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Narendra.Chaluchalamala
AppDynamics Team

How can Linux or Windows users pass startup parameters to their Machine Agents?

This article contains instructions for passing startup parameters, such as proxy details, to Machine Agents in Linux, or in Windows.

 

Table of Contents


 

Passing startup parameters to a Machine Agent in Linux

Linux users who wish to pass startup parameters such as proxy details to their Machine Agent have two options: during Machine Agent startup, or in the run time file.
 

Passing during Machine Agent startup

  1. Stop the Machine Agent.

  2. Depending on how you are starting Machine Agent, these JVM parameters can be added in startup command. For instance:
    1. When starting the Machine Agent from bin folder, JVM arguments will be passed as:
      ./machine-agent -Dappdynamics.http.proxyHost=XXX -Dappdynamics.http.proxyPort=80​

       

    2. When starting machineagent with machineagent.jar file, JVM arguments will be passed as:
      java -jar machineagent.jar -Dappdynamics.http.proxyHost=XXX -Dappdynamics.http.proxyPort=80​

Back to Table of Contents

 

Passing in the run-time file

  1. Stop the Machine Agent.

  2. Navigate to the <Machine Agent -Dir>\bin directory.

  3. Do a VI of filemachine-agent.

  4. In the VI editor, search for this line:
    JAVA_OPTS="$JAVA_OPTS -Xmx256m"​


    You should see that the -Xmx JVM argument is passed. After you pass the proxy settings, it will look like this: 

    JAVA_OPTS="$JAVA_OPTS -Xmx256m -Dappdynamics.http.proxyHost=XXX -Dappdynamics.http.proxyPort=80"

     

  5. Save the file.

  6. RestartMachine-Agent.

Back to Table of Contents

 

Passing startup parameters to a Machine Agent in Windows

Windows users who wish to pass startup parameters (such as proxy details) to their Machine Agent should follow these steps:

 

  1. Stop the Machine Agent service.

  2. Navigate to the <Machine Agent -Dir>\bin directory.

  3. Create a new empty file called MachineAgentService.vmoptions.

  4. Navigate to the <MachineAgent Home>/InstallService.vbs file and add the following lines of code before vmOptionsFile.WriteLine:
    vmOptionsFile.WriteLine("-Dappdynamics.http.proxyHost=XXX")
    vmOptionsFile.WriteLine("-Dappdynamics.http.proxyPort=80")​

    For example:
    Set vmOptionsFile = fsObject.OpenTextFile(scriptDir & "\bin\MachineAgentService.vmoptions", OVERWRITE, True)
     vmOptionsFile.WriteLine("-Dappdynamics.http.proxyHost=internet_proxy2.via.novonet")
     vmOptionsFile.WriteLine("-Dappdynamics.http.proxyPort=80")​

    NOTE: Do not create "MiniDump on crash". If the option is not supported by the JRE, the executable will ignore it.
    vmOptionsFile.WriteLine("-XX:-CreateMinidumpOnCrash")​

     

  5. Save the changes.

  6. Restart the service. 

Back to Table of Contents

 

Comments
Pranabesh.Saha
Explorer

Require your help on the following queries/issues:

 

  1.  I am not able to find <MachineAgent Home>/InstallService.vbs in the  Non-JRE windows install (i.e. within MachineAgent-20.4.0.2571.zip or even in the latest install MachineAgent-20.9.0.2763.zip)

    How do I run this Non-JRE bundled Agent as a Windows service?

  2. If I download the Windows machine agent with JRE bundled (i.e. machineagent-bundle-64bit-windows-20.4.0.2571), I cannot find out how to specify so that the windows service takes the JRE which is already installed in the host machine. 

    If I delete the <MachineAgent Home>/jre from the bundled after unzipping will it (
    MachineAgentService.exe ) pickup %JAVA_HOME% from the System environments parameter? 

  3.  How/Where to get the list of parameters accepted by MachineAgentService.exe ? Is this exe has a dependency on .NET Framework?
Narendra.Chaluchalamala
AppDynamics Team

Hi Pranabesh,

 It is required to install Machine agent with the bundled JRE , then only we can able to pass the parameters to machine agent service.

  If you would like to points to JRE located on your host , need to change the Java home parameter & path accordingly.

 

 

 

Thanks

Naren

Version history
Last update:
‎06-24-2021 01:21 PM
Updated by:
Join Us On December 10
Learn how Splunk and AppDynamics are redefining observability


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here