AppDynamics Application Intelligence Platform

3.8.x Documentation

PDFs

Videos

Release Notes

Child pages
  • Unattended Installation for .NET

AppDynamics Inc.

Skip to end of metadata
Go to start of metadata

The App Agent for .NET provides a command-line unattended installation procedure for cases when you have multiple servers that require the same AppDynamics configuration. Using unattended installation, you only need to configure once, then use the command line scripts to automate installation and instrumentation on multiple servers.

(info) For Windows Server 2003, unattended installation of the .NET Agent requires Windows Server 2003 SP2.

For more detail about how to install and configure the agent manually see Install the App Agent for .NET.

Prepare for Unattended Installation

The App Agent for .NET MSI installer package allows you to specify the path to a setup configuration file to perform an unattended installation. The setup configuration file contains all the properties you need to enable instrumentation for your .NET applications.

To create a setup configuration file

You must run the .NET MSI installer package on one computer before you can use the AppDynamics Agent Configuration utility to create a setup configuration file. See Install the App Agent for .NET.

(info) Setup configuration files created in previous versions of the AppDynamics Agent Configuration utility work with the 3.8 installer.

1. Launch the AppDynamics Agent Configuration utility from the command line. Use the -s parameter to specify the setup configuration file destination. See To create a configuration file.

AppDynamics.Agent.Winston.exe -s <path to setup configuration file>

2. Go through the configuration wizard normally.

The configuration utility saves the setup configuration file to the path you specified.

(info) The configuration utility only configures instrumentation for IIS applications.

3. Optional: To perform unattended installation for Windows services or for standalone applications, you must edit the setup configuration file manually.

Sample setup configuration file

The following example shows a setup configuration file that instruments two IIS Applications (MainBC and SampleHTTPService), a Windows service (BasicWindowsService), and a standalone application (MyStandaloneApp.exe).

The configuration file sets the log directory as C:\ProgramData\AppDynamics\DotNetAgent\Logs and grants write permission to four accounts.

<winston>
  <logFileDirectory directory="C:\ProgramData\AppDynamics\DotNetAgent\Logs" />
  <logFileFolderAccessPermissions defaultAccountsEnabled="false">
    <account name="NT AUTHORITY\LOCAL SERVICE" displayName="LOCAL SERVICE" />
    <account name="NT AUTHORITY\SYSTEM" displayName="SYSTEM" />
    <account name="NT AUTHORITY\NETWORK SERVICE" displayName="NETWORK SERVICE" />
    <account name="IIS_IUSRS" displayName="ApplicationPool Identity" />
  </logFileFolderAccessPermissions>
  <appdynamics-agent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <controller host="mycontroller.mycompany.com" port="8090" ssl="false">
      <application name="My Business Application" />
    </controller>
    <machine-agent />
    <app-agents>
      <IIS>
        <applications>
          <application path="/" site="MainBC">
            <tier name="Main Site" />
          </application>
          <application path="/" site="SampleHTTPService">
            <tier name="HTTP Services" />
          </application>
        </applications>
      </IIS>
      <windows-services>
         <windows-service name="BasicWindowsService">
            <tier name="Service Tier"/>
         </windows-service>
      </windows-services>
      <standalone-applications>
         <standalone-application executable="MyStandaloneApp.exe">
            <tier name="Standalone App" />
         </standalone-application>
      </standalone-applications>
    </app-agents>
  </appdynamics-agent>
</winston>

Perform Unattended Installation

After you have created a setup configuration file, use it to run an unattended installation.

Installation prerequisites

You must enable COM+ for the agent to function. See Verify COM+ Services are enabled.

To perform an unattended installation  

1. Uninstall any existing agent.

2. Launch an elevated command prompt with full administrator privileges. See Start a Command Prompt as an Administrator.

(warning) Logging on to Windows as a member of the Administrators group does not grant sufficient permissions to run the installer.

3. Run the agent MSI installer package from the elevated command prompt. Use the AD_SetupFile parameter to pass the absolute file path to the setup configuration file.

msiexec /i dotNetAgentSetup64.msi /q /norestart /lv %TEMP%\AgentInstaller.log AD_SetupFile=<absolute path to setup config.xml>

Optionally use the INSTALLDIR parameter to customize the agent installation directory.

INSTALLDIR=<custom agent install directory>

 

For example:

msiexec /i dotNetAgentSetup64.msi /q /norestart /lv %TEMP%\AgentInstaller.log AD_SetupFile=C:\temp\SetupConfig.xml INSTALLDIR=D:\AppDynamics

4. Restart the AppDynamics.Agent.Coordinator.

net stop AppDynamics.Agent.Coordinator
net start AppDynamics.Agent.Coordinator

5. Restart applications you have instrumented: IIS, Windows services, or standalone applications.

For example, to restart IIS:

iisreset

Setup Configuration File Properties

Winston element

The Winston element is the root element for the configuration file.

Required element: <winston>

Log File Directory element

The Log File Directory element is a child element of the Winston element. Use the directory attribute to specify the log directory. If you omit the Log File Directory element, we use the default directory:

Windows Server 2008 and later: %ProgramData%\AppDynamics\DotNetAgent\Logs
Windows Server 2003: %AllUsersProfile%\Application Data\AppDynamics\DotNetAgent\Logs

Optional element: <logFileDirectory directory="C:\ProgramData\AppDynamics\DotNetAgent\Logs" />

Log File Folder Access Permissions element

The Log File Folder Access Permissions is a child element of the Winston element. Unless you set the default accounts enabled attribute to false, we grant write access to the logs folder for the default accounts:

  • LOCAL SERVICE
  • SYSTEM
  • NETWORK SERVICE
  • ApplicationPool Identity

Optional element: <logFileFolderAccessPermissions defaultAccountsEnabled="false">

Account element

The Account element is a child element of the Log File Folder Access Permissions element. Create an Account element for the Windows account you use to run your application.

Set the name attribute to the name of account you use to run your application: the account for the application pool for IIS or the Windows service account.

The display name attribute is a user-friendly name you choose for the account. The display name shows up in log entries about assigning permissions for the account.

Optional element: <account name="MyAppPoolIdentity" displayName="Custom ApplicationPool Identity" />

For example, if you run a Windows service under a domain account:

<account name="MYDOMAIN\service_acct" displayName="Domain Service Account" />

AppDynamics Agent element

The AppDynamics Agent element is a child of the Winston element. It follows the same format as the config.xml to define the agent configuration for all your .NET applications. See App Agent for .NET Configuration Properties.

Required element: <appdynamics-agent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Learn More

Configure the App Agent for .NET
App Agent for .NET Configuration Properties
Enable the App Agent for .NET for Windows Services
Enable the App Agent for .NET for Standalone Applications

 

2 Comments

  1. Unknown User (julian.bennett@appdynamics.com)

    The installer command for the unattended installation should not reference %ProgramData%\AppDynamics\DotNetAgent for the installation log file.  This is because if you are doing a fresh installation that directory doesn't exist and msiexec fails (which requires removing the /q flag to diagnose).

    Can I suggest %TEMP%\AgentInstaller.log so the whole command would be

    msiexec /i dotNetAgentSetup64.msi /q /norestart /lv %TEMP%\AgentInstaller.log AD_SetupFile=<absolute path to setup config.xml>

  2. Thanks for pointing that out, Julian. I'll check into a resolution for this.