.NETの複数ビジネスアプリケーションサポートの構成

デフォルトでは、単一の Windows ホスト上のアプリケーションは、コントローラ内の 1 つのビジネスアプリケーションにマップされます。必要に応じて、手動で .NET エージェントを構成し、コントローラで同一の Windows ホスト上の複数のアプリケーションを、様々なビジネスアプリケーションにマップできます。

単一のホスト上のアプリケーションを別のビジネスアプリケーションにマップするには、 config.xml を手動で編集する必要があります。Splunk AppDynamics エージェント構成ユーティリティでは、この構成オプションは使用できません。

複数のアプリケーションサポートを構成すると、後で構成ユーティリティを使用して構成を変更することはできません。複数のアプリケーションサポートを構成したサーバで構成ユーティリティを起動すると、ユーティリティは構成を削除するよう促すプロンプトを表示します。

複数のビジネスアプリケーションを構成するための準備

.NET エージェントを構成する前に、エージェントをインストールする必要があります。Splunk AppDynamics エージェント構成ユーティリティを使用して、基本的な構成タスクを実行します。

  1. ビジネスアプリケーションの整理方法を指定し、ビジネスアプリケーション名を指定します。たとえば、IIS を実行している Windows ホストがあるとします。IIS インスタンスは、Ticket Search と Travel Search という 2 つの異なる顧客に対して 2 つのアプリケーションを提供します。アプリケーションは同様の機能を実行しますが、個別に機能するため、それぞれモニタすることは理にかなっています。この場合は、アプリケーション名(Ticket Search Engine と Travel Search Engine)に基づいて 2 つのビジネスアプリケーションを作成します。
  2. Windows マシンで IIS コンソールを開き、[接続(Connections)] > <アプリケーション名> > [サイト(Sites)] に移動します。
  3. 各サイトで、IIS アプリケーションまたはアプリケーションプール、Windows サービス、スタンドアロン アプリケーションをさまざまなビジネスアプリケーションの階層にマッピングします。たとえば、TicketSearch サイトを Ticket Search Engine ビジネスアプリケーションの Ticket Search Web ティアにマップします。TravelSearch サイトを Travel Search Engine ビジネスアプリケーションの Travel Search Web ティアにマップします。
  4. まだインストールしていない場合は、.NET エージェントをインストールします。「Windows 用 .NET エージェントのインストール」を参照してください。
  5. Splunk AppDynamics エージェント構成ユーティリティを実行して config.xml を生成し、コントローラ接続を構成します。「.NET エージェントの構成」を参照してください。
  6. プロンプトが表示されたら、ティア生成と割り当ての方法として [手動(Manual)] を選択します。
    注: 構成ユーティリティは 1 つのサーバにつき 1 つのビジネスアプリケーションのマッピングのみをサポートします。

Manually Configure the .NET Agent

Once you have configured the Controller properties for the .NET Agent, instrument your .NET Applications in the config.xml.

  1. Openthe config.xml file as administrator and edit the file. See 'Where to Configure Agent Properties' on Administer the .NET Agent.
  2. Copy the controller applications block and paste it as a child element of the controller element. Replace any existing <applications> or <application> elements:
    <!--Configure multiple business applications-->
    <applications>
    <application name="ApplicationName1" default ="true"/>
    <application name="ApplicationName2"/>
    </applications>
  3. Add an application element for each of the business applications in the Controller.
    • Edit the name attribute for the application elements to match the business application names in the Controller. If the application does not exist, the Controller creates it.
    • Set the default attribute to true for one application element. If the agent cannot find a match for the business application name in the IIS application, Windows service, or standalone application configuration, the tier reports to the default business application.
    In this example, Ticket Search is the default business 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">
    <account name="customer1" password="changeme" />
    <!--Configure multiple business applications-->
    <applications>
    <application name="Ticket Search" default ="true"/>
    <application name="Travel Search"/>
    </applications>
    </controller>
    ...
  4. Add configuration elements for the IIS applications or application pools, Windows services, or standalone applications to instrument.For IIS applications, add the applications block as a child of the IIS element. Replace the existing applications element. See IIS Applications Element.
    <applications>
    <application path="/" site="FirstSite" controller-application="Application1">
    <tier name="FirstSite Tier"/>
    </application>
    <application path="/" site="SecondSite" controller-application="Application2">
    <tier name="SecondSite Tier"/>
    </application>
    </applications>
    For IIS application pools, add the application pools block as a child of the IIS element. Replace the existing <application-pools> element. See IIS Application Pools Element.
    <application-pools>
    <application-pool name="MyAppPool1" controller-application="Application1">
    <tier name="App1 AppPool Tier"/>
    </application-pool>
    <application-pool name="MyAppPool2" controller-application="Application2">
    <tier name="App2 AppPool Tier"/>
    </application-pool>
    </application-pools>
    For Windows services or standalone applications, add the standalone-applications block as a child of the app-agents element. See Standalone Applications Element.
    <standalone-applications>
    <standalone-application executable="MyStandaloneApp.exe" controller-application="ApplicationName1">
    <tier name="Standalone App Tier"/>
    </standalone-application>
    <standalone-application executable="MyWindowsService.exe" command-line="-x" controller-application="ApplicationName2">
    <tier name="Windows Service Tier"/>
    </standalone-application>
    </standalone-applications>
  5. Configure your application elements:
    • Add the corresponding element for each IIS application or application pool, Windows service, or standalone application to instrument. See .NET Agent Configuration Properties.
    • For each application element set the controller-application attribute to the name of the corresponding business application. If you omit the controller-application attribute, the agent adds the application to a tier in the configured default business application.
    • Set the tier element name attribute to the business application tier name.
  6. After you complete configuration, save the changes to the config.xml file.
  7. Restart the AppDynamics.Agent.Coordinator service.
  8. Restart IIS applications or application pools, Windows services, and standalone applications.
  9. As your applications begin processing traffic, the agent registers them with the Controller. Log on to the Controller to see that your applications have registered with the corresponding business application.

設定例

この config.xml ファイルのサンプルは、コントローラの複数のビジネスアプリケーションの構成を示しています。Windows サービスの TicketService では controller-application 属性が指定されないため、デフォルトのビジネスアプリケーションである Ticket Search Engine にレポートされます。TravelAPIPool プール内のすべてのアプリケーションは、Travel Search Engine にレポートされます。

<?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">
<!--Configure multiple business applications-->
<applications>
<application name="Ticket Search Engine" default ="true"/>
<application name="Travel Search Engine"/>
</applications>
</controller>
<machine-agent />
<app-agents>
<IIS>
<automatic enabled="false" />
<application-pools>
<application-pool name="TravelAPIPool" controller-application="Travel Search Engine">
<tier name="Travel APIs"/>
</application-pool>
</application-pools>
<applications>
<application path="/" site="TicketSearch" controller-application="Ticket Search Engine">
<tier name="Ticket Search Web"/>
</application>
<application path="/" site="TravelSearch" controller-application="Travel Search Engine">
<tier name="Travel Search Web"/>
</application>
</applications>
</IIS>
<standalone-applications>
<standalone-application executable="StandaloneApp.exe" controller-application="Ticket Search Engine">
<tier name="Ticket Standalone Tier"/>
</standalone-application>
<standalone-application executable="WindowsService.exe" command-line="-x" controller-application="Travel Search Engine">
<tier name="Travel Windows Service Tier"/> </standalone-application>
</standalone-applications>
</app-agents>
</appdynamics-agent>

Agent Configuration Properties for Multiple Application Support

Multiple business application support includes configuration properties for the .NET Agent. These configuration properties supersede the ones documented in .NET Agent Configuration Properties.

Controller Applications Element

The applications element is a child of the controller element. It is a container element for all controller applications elements that map to business applications in the Controller.

Required Element: <applications>

Controller Application Element

The controller application element is a child of the controller applications element. It indicates the name of the logical business application you see in the Controller. When you have more than one Controller Application element, you must set the default attribute to true for one of them.

Required Element: <application name="MyDotNetApplication" default="true"/>

Application name attribute

Set the application name attribute to the business application name in the Controller. If the application name does not exist, the Controller creates it when the agent registers.

Type: String

Default: None

Required: Yes

Application default attribute

Set the application default attribute to true for one controller application element. Instrumented applications without the controller application attribute register with the default business application in the Controller.

Type: Boolean

Default: false

Required: For one application in multiple application configurations

Controller-Application Attribute

The IIS application, IIS application-pool, windows-service, and standalone-application elements accept the controller-application attribute. Set the value to the controller application element name. If you do not include a controller-application attribute, the application registers with the default business application.

For example, an IIS application:

<application path="/" site="MySite" controller-application="My Business Application">

Type: String

Default: None

Required: No