AppDynamics Application Intelligence Platform

3.8.x Documentation

PDFs

Videos

Release Notes

Child pages
  • Enable the App Agent for .NET for Windows Services

AppDynamics Inc.

Skip to end of metadata
Go to start of metadata

By default, AppDynamics enables the App Agent for .NET only for IIS worker processes. This topic describes how to edit the config.xml file to enable the agent for Windows services.

Preparing to Configure the App Agent for .NET for Windows Services

Before you enable the App Agent for .NET for Windows services, you must install the agent. We recommend using the AppDynamics Agent Configuration utility to perform basic configuration tasks.

  1. If you have not already done so, install the App Agent for .NET. See Install the App Agent for .NET
  2. Run the AppDynamics Agent Configuration utility to generate a config.xml. See Configure the App Agent for .NET.
    Even though the Configuration Utility only instruments IIS Applications, it is useful to create the config.xml and specify Controller connection properties.

    (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.

    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.

Configuring the App Agent for .NET for Windows Services

Once you have configured the Controller properties for the App Agent for .NET, instrument your Windows service by adding an XML element for it to the config.xml.

  1. Edit the config.xml file as an administrator. See Where to Configure App Agent Properties.

    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.mycompany.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 Windows Services block as a child of the App Agents element. Create a Windows Service element for each Windows service you want to instrument. Use the Tier element to assign the instrumented service to a tier in the Controller. See App Agent for .NET Configuration Properties

    <windows-services>
       <windows-service name="BasicWindowsService">
         <tier name="Service Tier"/>
       </windows-service>
       <windows-service name="SecondWindowsService">
         <tier name="Service Tier"/>
       </windows-service>
    </windows-services>
  3. Set the Windows Service element name attribute to the service name. The service name may not be the same as the display name in the Services panel of the Server manager.


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

    <?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>
        <windows-services>
            <windows-service name="BasicWindowsService">
               <tier name="Service Tier"/>
            </windows-service>
        </windows-services>
      </app-agents>
    </appdynamics-agent>
  4. Restart the AppDynamics.Agent.Coordinator

  5. Restart the Windows service.

    If your Windows service does not implement any of the frameworks we instrument by default, you must configure a POCO entry point for a class/method in your service for the agent to begin instrumentation. See Supported Environments and Versions for .NET and POCO Entry Points.

Learn More