This page applies to an earlier version of the AppDynamics App IQ Platform.
For documentation on the latest version, see the 4.4 Documentation.


Skip to end of metadata
Go to start of metadata

By default, the .NET Agent only instruments IIS applications. Edit the .NET Agent config.xml configuration file to enable the agent for Windows services and standalone applications.

It is possible to instrument any combination of IIS applications, Windows services, and standalone applications on a single server.

Prerequisites

  1. Install the .NET Agent.
  2. Run the AppDynamics Agent Configuration utility to perform basic configuration tasks such as controller connectivity and to generate a config.xml.

    (info) If you have previously instrumented app agents for IIS applications, don't run the configuration utility. You already have a config.xml.

    Use the configuration utility to do the following:

    • Change the location of the Logs directory and assign permissions.
    • Configure and test connectivity to the Controller.
    • Set the Business Application for the agent.

    (tick) If you are not instrumenting IIS, choose Manual for the method of tier generation and assignment. Don't assign assign any tiers for any IIS applications. This disables instrumentation for all IIS applications.

Manually Configure the .NET Agent

Once you have configured the Controller properties for the .NET Agent, instrument your Windows service or standalone application by adding the Standalone Applications XML element to the config.xml.

  1. Edit the config.xml file as an administrator. See Administer the .NET Agent

    If you haven't instrumented IIS applications, the file contains minimal configurations for Controller connectivity and the machine agent. Verify the Controller properties and the Business Application name.

    <?xml version="1.0" encoding="utf-8"?>
    <appdynamics-agent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <controller host="mycontroller.example.com" port="8090" ssl="false">
        <application name="My Business Application" />
      </controller>
      <machine-agent />
      <app-agents>
        <IIS>
          <applications />
        </IIS>
      </app-agents>
    </appdynamics-agent>

    If you have already instrumented IIS applications, you see their configurations under the IIS element.

  2. Add the Standalone Applications block as a child of the App Agents element. Create a Standalone Application element for each Windows service or standalone application you want to instrument.

    <standalone-applications>
       <standalone-application executable="MyStandaloneApp.exe">
         <tier name="Standalone Tier 1" />
       </standalone-application>
       <!-- Instrument a standalone application using a partial path. -->
       <standalone-application executable="MyApplication\MyOtherStandaloneApp.exe">
         <tier name="Standalone Tier 2" />
       </standalone-application>
       <!-- Instrument a Windows service using arguments. -->
       <!-- The following example matches the command "MyWindowsService.exe -d -x -r". -->
       <standalone-application executable="MyWindowsService.exe" command-line="-x">
         <tier name="Windows Service Tier" />
       </standalone-application>
    </standalone-applications>
    • Use the Tier element to assign the instrumented application to a tier in the Controller. See .NET Agent Configuration Properties.

    • Set the Standalone Application element executable attribute to one of the following:

      • Executable name. For example, MyStandaloneApp.exe or MyWindowsService.exe. The file extension is optional, so MyStandaloneApp also works.

      • Full path to the executable. For example, C:\Program Files\MyApplication\MyStandaloneApp.exe.
      • Partial path to the executable. For example, MyApplication\MyStandaloneApp.exe.
        (tick) Use the full or partial path to the executable when you want to assign different tiers to separate instances of the same executable running from different paths.
      • To differentiate between two instances of the same executable, specify any unique portion of the application's command line, such as an argument, in the Standalone Application command-line attribute.

        • Run the following command to find the executable path for a Windows service:

          sc qc <Windows service name>

          OR

        • Use the Microsoft Management Console to look up the executable path for a Windows service.

        • Use the full or partial path to the executable when you want to assign different tiers to separate instances of the same executable running from different paths.

  3. Restart the AppDynamics.Agent.Coordinator

  4. Restart the Windows service or standalone application.

  5. If your Windows service or standalone application doesn't implement an auto-detected framework, you must configure a POCO entry point for a class/method in your service for the agent to begin instrumentation.

Sample Configuration File

This sample config.xml demonstrates instrumentation for a Windows service and standalone application:

<?xml version="1.0" encoding="utf-8"?>
<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 />
    </IIS>
    <standalone-applications>
        <standalone-application executable="MyWindowsService.exe" command-line="-x">
           <tier name="Windows Service Tier" />
        </standalone-application>
        <standalone-application executable="MyStandaloneApp.exe">
           <tier name="Standalone Tier" />
        </standalone-application>
    </standalone-applications>
  </app-agents>
</appdynamics-agent>