エージェント側のコンポーネントのインストール

ほとんどのアプリケーション分析の展開シナリオで、Analytics エージェント側のコンポーネントを有効にする必要があります。エージェントは、システムベースのオペレーションまたはスタンドアロンのバンドルとして、ダウンロードポータルで配布されます。

Java エージェントアプリケーション サーバー エージェントが (21.2 以降)および (20.10 以降)などのエージェントレス分析をサポートしている場合、トランザクション分析データ収集のためにスタンドアロンの分析エージェントまたはマシンエージェント拡張機能をインストールする必要はありません。 詳細については、「分析エージェント({0})を使用しない分析の展開」を参照してください。

エージェントを有効にするための準備

Analytics エージェントを使用した分析の展開」で展開オプション、エージェント側コンポーネントのアーキテクチャを確認して、インストールする必要があるコンポーネントを確認します。

Analytics Agent

The Analytics Agent collects and sends data from the Splunk AppDynamics App Agent and log files to the Events Service. The Analytics Agent is not enabled by default. You need to download and enable the desired bundle using a method of your choice.

警告: In the Analytics Agent version >=21.7 the debug/grok endpoint is disabled by default. To enable the endpoint, start the Analytics Agent with the property ad.debug.grok.endpoint.enabled=true in agent.properties file.

To use Application Analytics:

  1. Obtain a separate Application Analytics license.
  2. Enable the Analytics Agent.
  3. Point to the Event Service. See Revise the Analytics Agent Properties File for agent-specific configuration and Event Service Deployment for the Event Service.
  4. Enable Analytics on the Controller.

Splunk AppDynamics App Agent

To access Analytics and collect transaction data from an application, you must deploy a supported app server agent version in all environments, such as the Node.js Agent or the PHP Agent. If you already use Splunk AppDynamics APM, agents may already be installed in your environment.

Windows でのスタンドアロン Analytics エージェントのインストール

Analytics のデプロイオプション」で説明したように、Analytics エージェントは、使用ケースに応じて、アプリケーション サーバ エージェントと同じホストまたは別のホストで実行できます。

ダウンロードポータルには、次の配布アーカイブが用意されています。

  • スタンドアロン Analytics エージェント(JRE なし)
  • 32 ビットと 64 ビットの両方の Windows マシン用の Analytics エージェント(JRE 1.8 付属)
警告: 管理者のみが Analytics エージェントのディレクトリを変更できることを確認します。 ディレクトリで次のコマンドを実行して、管理者アクセス権を付与します。
icacls . /inheritance:r /grant Users:(OI)(CI)RX /grant Administrators:(OI)(CI)F

Analytics エージェントのプロパティファイルの変更

Analytics エージェントのプロパティファイルにより、Analytics エージェントが他のコンポーネントと通信する方法、監視対象アプリケーションから収集するデータのタイプ、および Application Analytics デプロイのコンポーネントとコントローラが相互に認証する方法が決まります。

デフォルト設定を変更し、プロパティファイルのエージェントプロパティに必要な値を設定します。実際の展開シナリオによっては、このファイルの場所は異なります。

  1. テキストエディタで <analytics-agent-home>/conf/analytics-agent.properties ファイルを開きます。Windows の Analytics エージェントでは、パスに二重のバックスラッシュが必要です。例:
    conf.dir=C:\\AppD\\analytics-agent\\conf
    ad.dw.log.path=C:\\AppD\\analytics-agent\\logs
  2. Analytics エージェントを Windows サービスとして実行するには、次のプロパティを変更します。
    • ad.dw.log.path = <analytics-agent-home>\\logs
    • conf.dir = <analytics-agent-home>\\conf
    • ad.jvm.options.name=analytics-agent.vmoptions
    • ad.jvm.heap.min=512m
    • ad.jvm.heap.max=1g
  3. 指示に従って、スタンドアロン Analytics エージェントを有効にします。
  4. Windows に Analytics エージェントをインストールするには、次のように install コマンドを実行します。
    bin\analytics-agent.exe service-install

Start and Stop the Analytics Agent

To start/stop the Analytics Agent on Windows, run the following commands in the Windows Services menu.

To start the agent, run:

bin\analytics-agent.exe service-start

To stop the agent, run:

bin\analytics-agent.exe service-stop

Uninstall the Analytics Agent

To uninstall the Analytics Agent, run the .exe uninstall

bin\analytics-agent.exe service-uninstall

Enable Analytics Agent for a Local App Server Agent

This section assumes that you are installing the Analytics Agent on the same host as your app server agent.

In this deployment, the Analytics Agent reads and transmits log data in log files from the local machine. The app server agent transmits data from the monitored application to the Analytics Agent.

Analytics Agent Deployment Diagram

Analytics Agent with the .exe and analytics-agent.exe files found in the <analytics-agent-home>/bin directory. Because the Analytics Agent is written in Java, you will run the agent in a Java Virtual Machine (JVM). The Analytics Agent runs as a Windows service.

Enable the App Server Agent for a Remote Analytics Agent

To specify the location of the remote Analytics Agent with an environment variable named appdynamics.analytics.agent.url on Windows:

  1. On your Windows machine, go to System Properties > Advanced system settings > Environment Variables.
  2. Under System Variables, click New. Splunk AppDynamics recommends a system environment variable approach as opposed to a user environment variable approach; in the environment variable approach, a user must have the same permissions as the user with all the instrumented applications running.
  3. Set the value for theappdynamics.analytics.agent.url system variable to http://<analytics-agent-ip>:9090/v2/sinks/bt . Replace <analytics-agent-ip> with the hostname of the Analytics Agent for your environment.
    New System Variable
  4. Restart the applicable application or process where you want the new environment variables to take effect. While it is not required that you restart your machine, the parent process that invokes the monitored process must be restarted. Forw3wp on Windows, restart IIS by running iisreset after the changes are made to the environment variables.

Linux でのスタンドアロン Analytics エージェントのインストール

Analytics のデプロイオプション」で説明したように、Analytics エージェントは、使用ケースに応じて、アプリケーション サーバ エージェントと同じホストまたは別のホストで実行できます。

ダウンロードポータルには、次の配布アーカイブが用意されています。

  • スタンドアロン Analytics エージェント(JRE なし)

アプリケーション サーバ エージェントのデフォルト設定では、通常、Analytics エージェントが同じホスト上にあり、デフォルトポートを使用していると想定されます。次の図に示すように、アプリケーション サーバ エージェントとは別のホストに Analytics エージェントが存在する場合、またはデフォルトポートを変更した場合は、アプリケーション サーバ エージェントの新しいホストとポートの値を指定する必要があります。

Analytics エージェントを備えたスタンドアロンマシン

Revise the Analytics Agent Properties File

The Analytics Agent properties file determine how your Analytics Agent communicate with other components, what type of data it gathers from the monitored application, and how the components of the Application Analytics deployment and the Controller authenticate to each other.

Modify the default configuration and set the desired values for the agent properties in the properties file. The location of this file depends on your exact deployment scenario.

  1. Open the <analytics-agent-home>/conf/analytics-agent.properties file with a text editor.
  2. Follow the instructions to enable the standalone Analytics Agent.

Start and Stop the Analytics Agent

You can start and stop the Analytics Agent directly in the command line.

To start the agent, run:

<analytics agent executable> start

To stop the agent, run:

<analytics agent executable> stop

Run the Analytics Agent From a Read-Only Filesystem

In this deployment, the Analytics Agent is installed and run from a read-only filesystem. To do so, you need to direct the Analytics Agent to write its log files to a writable partition.

Read-only Filesystem with the Analytics Agent

By creating a directory for the Analytics Agent in a writable file system and symlinks for the content of the Analytics Agent in the read-only file system, you will have a writable top-level directory for the Analytics Agent and a writable logs directory under the top-level directory.

To run the Analytics Agent from a separate writable directory using artifacts from a read-only directory:

  1. Provide necessary permissions to the read-only Analytics Agent directory.
    # analytics-agent-readonly refers to the read-only analytics agent.
    chmod -R 555 /tmp/analytics-agent-readonly/
  2. Create a directory for the Analytics Agent in a writable file system.
    mkdir /tmp/analytics-agent-writable
    chmod 755 analytics-agent-writable/
    cd /tmp/analytics-agent-writable
  3. Create symlinks to the contents of the Analytics Agent in the read-only file system.
    ln -s /tmp/analytics-agent-readonly/bin/ bin
    ln -s /tmp/analytics-agent-readonly/lib/ lib
    ln -s /tmp/analytics-agent-readonly/monitor.xml monitor.xml
  4. Create a writable conf directory under that top-level directory.
    cd /tmp/analytics-agent-writable
    mkdir conf
    chmod 755 conf/
    cd conf
  5. Create symlinks to the contents of the conf directory.
    ln -s /tmp/analytics-agent-readonly/conf/analytics-agent.* .
    ln -s /tmp/analytics-agent-readonly/conf/job/ job
    ln -s /tmp/analytics-agent-readonly/conf/grok/ grok
    cd /tmp/analytics-agent-writable
  6. Create logs directory under theanalytics-agent-writable directory.
  7. Run the Analytics Agent from the writable directory.
    cd /tmp/analytics-agent-writable
    nohup bin/analytics-agent.sh start &
  8. The resulting directories look similar to:
    /tmp/
    dr-xr-xr-x  6 ec2-user ec2-user 4096 Jul 17 20:45 analytics-agent-readonly
    drwxr-xr-x  4 ec2-user ec2-user 4096 Jul 26 20:17 analytics-agent-writable
    /tmp/analytics-agent-writable/
    total 24
    drwxr-xr-x . . . 4096 Jul 27 19:41 .
    drwxrwxr-x  . . .  4096 Jul 27 19:37 ..
    lrwxrwxrwx 1 . . .   50 Jul 27 19:38 bin -> /tmp/analytics-agent-readonly/bin/
    drwxr-xr-x . . .  4096 Jul 27 19:41 conf
    lrwxrwxrwx . . .  50 Jul 27 19:38 lib -> /tmp/analytics-agent-readonly/lib/
    drwxrwxr-x . . . 4096 Jul 27 19:41 logs
    lrwxrwxrwx . . .   57 Jul 27 19:38 monitor.xml -> /tmp/analytics-agent-readonly/monitor.xml
    conf/
    total 20
    drwxr-xr-x . . . 4096 Jul 27 19:41 .
    drwxr-xr-x . . . 4096 Jul 27 19:41 ..
    lrwxrwxrwx . . .   77 Jul 27 19:39 analytics-agent.properties -> /tmp/analytics-agent-readonly/conf/analytics-agent.properties
    lrwxrwxrwx . . .   76 Jul 27 19:39 analytics-agent.vmoptions -> /tmp/analytics-agent-readonly/conf/analytics-agent.vmoptions
    lrwxrwxrwx . . .  56 Jul 27 19:40 grok -> /tmp/analytics-agent-readonly/conf/grok/
    lrwxrwxrwx . . .  55 Jul 27 19:39 job -> /tmp/analytics-agent-readonly/conf/job/
    drwxrwxr-x . . . 4096 Jul 27 21:32 watermark

Enable the App Server Agent for a Remote Analytics Agent

For most configurations, install the Analytics Agent on the same machine as the app server agent. In certain setups, such as installing an Analytics Agent extension, you will need a separate machine.

  1. Specify the location of the remote Analytics Agent with a -D parameter. The argument is passed to the monitored application as follows:
    -Dappdynamics.analytics.agent.url=http://<analytics-agent-ip>:9090/v2/sinks/bt
  2. Replace <analytics-agent-ip> with the hostname of the Analytics Agent for your environment.

スタンドアロン Analytics エージェントの有効化

この展開では、Analytics エージェントとアプリケーション サーバ エージェントが同じマシン上で実行されます。Analytics エージェントは、ホストマシン上のログファイルからログデータを読み取り、送信します。アプリケーション サーバ エージェントは、監視対象アプリケーションから Analytics エージェントにデータを送信します。

Analytics エージェントとアプリケーション サーバー エージェントを使用するマシン

マシンエージェントがインストールされていない環境の場合、Analytics エージェントを個別のバイナリとしてインストールします(analytics-agent.sh)。

  1. Analytics エージェントの配布アーカイブを各ターゲットホストのインストールディレクトリに解凍します。このアーカイブを解凍すると、次の 3 つのディレクトリが作成されます。
    • bin:Linux、Solaris、および OSX 用のバイナリファイルが含まれています。
    • lib:クラスパスに存在する必要があるすべての jar ファイルが含まれています。
    • conf:プロパティファイルや vmoptions ファイルなど、すべての構成ファイルが含まれています。
  2. Analytics エージェントからイベントサービスへの接続を設定するために、次のファイルを開きます。
    <analytics-agent-home>/conf/analytics-agent.properties
  3. analytics-agent.properties ファイルで、次の手順を実行します。
    • デフォルトの URL を変更し、必要に応じて、http.event.endpoint 値を変更することでイベントサービスに接続するためのポート番号を変更します。例:

      http.event.endpoint=http://<events_service_host:events_service_port>

      SaaS ベースのインストールでは、ホストとポートは次のとおりです。

      • https://analytics.api.appdynamics.com:443(北米)

      • https://fra-ana-api.saas.appdynamics.com:443(欧州)
      • https://syd-ana-api.saas.appdynamics.com:443 APAC

      分析の問題のトラブルシューティングファイアウォールルールで IP アドレスが使用されている場合は、「Analytics エージェントの問題のトラブルシューティング」のファイアウォールの考慮事項を確認します。オンプレミスのインストールの場合、設定済みのホストとポートを使用します。クラスタ環境では、多くの場合、これはロードバランサです。

    • ad.controller.url プロパティを変更して、コントローラをポイントするようにデフォルトの URL とポート番号を変更します。例:

      ad.controller.url=http://<application_server_host_name>:<http-listener-port>

      これは、コントローラ UI にアクセスするために使用する URL とポート番号です。

  4. [Global Account Name] と [Access Key] の値は、コントローラの [View License] に表示されます。
  5. エージェントがビジネス トランザクション データをパブリッシュするアカウントとアカウントキーを設定します。以前に収集した http.event.accountName、http.event.accessKey、http.event.name customer1 analytics-agent.log の [Global Account Name] と [Access Key] の値を使用します。例:
    # The global_account_name in the Controller for this analytics data, similar to the following:
    http.event.accountName=<customer1_74678b04-8a71-40ef-acaf-xxxxxxxxxxxx>
    # Replace this value with the access key of the account name configured above.
    http.event.accessKey=<3d58aba2-xxx-xxx>
    http.event.accountName プロパティは、アカウントの [Global Account Name] を指定します。http.event.accessKey プロパティは  を指定します。これは、コントローラと Application Analytics デプロイのコンポーネント間の認証メカニズムを提供します。コントローラのインストールプロセスでアクセスキーの値が生成されます。SaaS ベースのインストールの場合は、http.event.name プロパティをアカウントの [Name] に設定します。デフォルト値は customer1 です。このプロパティが正しく設定されていない場合、Analytics エージェントは認証できません。発生したエラーは analytics-agent.log ファイルに保存されます。
  6. このホストでログ情報を収集する場合は、次のことを行う必要があります。
  7. ファイルを保存して、閉じます。
  8. 次のコマンドを実行して、Analytics エージェントを起動します。
    bin\analytics-agent.sh start

マシンエージェントの拡張としての Analytics エージェントの有効化

このセクションでは、Analytics エージェントをマシンエージェントの拡張機能として設定し、マシンエージェントモニタとして実行する方法について説明します。

ダウンロードポータルには、次の配布アーカイブが用意されています。

  • マシンエージェントバンドル:64 ビット osx(zip)
  • マシンエージェントバンドル:32 ビットと 64 ビットの両方の Linux マシン用(rpm)
  • マシンエージェントバンドル:32 ビットと 64 ビットの両方の Linux マシン用(zip)
  • マシンエージェントバンドル:64 ビット solaris 用(zip)
  • マシンエージェントバンドル:64 ビット solaris-sparcv9 用(zip)
  • マシンエージェントバンドル:64 ビット solaris-x64 用(zip)
  • マシンエージェントバンドル:32 ビットと 64 ビットの両方の Windows マシン用(zip)

マシンエージェントとアプリケーション サーバ エージェントが同じマシンで実行されている場合は、スタンドアロン Analytics エージェントをインストールする必要はありません。マシンエージェントがすでに実行されている環境では、Analytics エージェントを拡張機能として有効にして実行できます。

スタンドアロン マシン エージェントの拡張機能マシンエージェントを実行しているホストに JRE 8 以降がインストールされていることを確認します。必要なバージョンの JRE がホストで使用できない場合、Analytics エージェントは有効にできません。

  1. マシンエージェントを実行しているホストで、テキストエディタを使用して <machine-agent-home>/monitors/analytics-agent/monitor.xml を開きます。
  2. enabled タグを true に設定し、完了したらファイルを保存します。
    <monitor>
    <name>AppDynamics Analytics Agent</name>
    <type>managed</type>
    <!-- Enabling this requires JRE 8 or higher  -->
    <enabled>true</enabled>
    ...
  3. Analytics エージェントからイベントサービスへの接続を設定するために、次のファイルを開きます。
    <machine-agent-home>/monitors/analytics-agent/conf/analytics-agent.properties
  4. 指示に従って、スタンドアロン Analytics エージェントを有効にします。
  5. この時点でマシンエージェントがすでに実行されている場合は、再起動して設定の変更を適用します。
注: プロキシサーバーを介してイベントサービスに接続する場合は、

プロキシ経由でエージェントをイベントに接続する」を参照してください

.

Analytics エージェントの調整

このセクションでは、Analytics エージェントのインストール後の設定(プロキシサーバを使用してイベントサービスに接続するための Analytics エージェントの設定、統合ログ管理(CLM)を使用したログファイルの収集、リソース使用制限の設定、JVM オプションの変更)について説明します。

Connect to the Events Service through a Proxy

If the Analytics Agent needs to connect to the Events Service through a proxy server:

  1. Open<analytics-agent-home>\conf\analytics-agent.properties with a text editor.
  2. Add this information:
    # optional proxy properties
    http.event.proxyHost=<your proxy host>
    http.event.proxyPort=<your proxy port>
    http.event.proxyUsername=<your proxy username, if authentication is required>
    http.event.proxyPassword=<your proxy password, if authentication is required>
  3. Save and close the file.

統合ログ管理用の Analytics エージェントの設定

Analytics エージェントが CLM と連携するようにするには、Analytics エージェントのプロパティファイルでいくつかのプロパティを設定する必要があります。

analytics-agent.properties ファイルで、コントローラの URL、顧客名、および Analytics エージェントの名前を指定します。顧客名は、コントローラの [View License] UI で確認できます。

CLM を使用してソースルールによりログファイルを設定する場合は、これらのプロパティに正しい値を指定する必要があります。

デフォルト値は次のとおりです。

# Format should be http://<host>:<port>
ad.controller.url=http://localhost:8090
# The customer name field from the AppDynamics license page.
http.event.name=customer1
# This is the friendly agent name that will show up in the controller when the agent registers and syncs configuration.
ad.agent.name=analytics-agent1

Change Java Virtual Machine Options

If you need to change any JVM startup options, modify <analytics-agent-home>/conf/analytics-agent.vmoptions with a text editor.

The vmoptions file name is read from the ad.jvm.options.name=analytics-agent.vmoptions properties file. If you change the vmoptions file name, you will need to change the ad.jvm.options.name property as well.

If the Analytics Agent Windows service is installed and you need to change the properties file or the vmoptions file, you need to uninstall the service and reinstall it for the changes to take effect.

リソース使用の制限の設定

リソースの使用を制限するために、単一の Analytics エージェントのジョブ数に対するデフォルトの制限を有効にできます。

この制限は上書きできますが、CPU 使用率、ディスク、ネットワーク I/O などのリソースの使用に対する潜在的な影響を十分に理解していない場合はお勧めしません。

このプロパティは ad.max.enabled.jobs で、<analytics-agent-home>/conf/analytics-agent.properties ファイルにあります。デフォルトでは、ad.max.enabled.jobs は 20 に設定されています。

Verify Analytics Agent Status

To verify that the Analytics Agent has started, look for the following entry in the App Agent log file: Started [Analytics] collector

To connect to the Events Service through a proxy server, see Connect the Agent to the Events Service through a Proxy.

その他の設定

Analytics エージェントのバージョンが 21.7 以降の場合、パイプラインリソースに認証を追加できます。次の手順を実行します。

  1. パイプラインエンドポイントに認証を追加するには、analytics-agent.properties の次のプロパティを使用します。
    ad.pipeline.resource.authenticate=true
  2. 有効にすると、アカウントの Global-Account_Name および Access-Key をそれぞれ HTTP ヘッダー X-AppDynamics-Global-Account-Name および X-Analytics-Agent-Access-Key として渡すことで、エンドポイントにアクセスします。
    --header 'X-Analytics-Agent-Access-Key: access_key' \
    --header 'X-AppDynamics-Global-Account-Name: global_account_name' \

コントローラおよびイベントサービスへのエージェント接続用 TLS の設定

デフォルトでは、Analytics エージェントは TLS 1.2 を使用します。コントローラとイベントサービスも同じ TLS バージョンを使用していることを確認します。別のバージョン(TLS 1.3 など)を設定するには、conf/analytics-agent.properties ファイルで ad.http.tls.version=TLSv1.3 を指定します。「Analytics エージェントのプロパティファイルの変更」を参照してください。

TLS 1.3 を使用する場合は、基盤となる JDK に次のバージョンを使用する必要があります。

    • HP-UX の場合:1.8.0.26-hp-ux 以降
    • AIX の場合:1.8.0_381 以降

    • その他の場合:jdk8_261 より後
  • 使用している基盤となる JDK で TLS 1.3 がサポートされていない場合、ログメッセージに次のエラーが表示されます。

    エラー
    NoSuchAlgorithmException: TLSv1.3 SSLContext not available

    このエラーを解決するには、上記の JDK を使用するか、TLS 1.2 を設定する必要があります。TLS 1.2 を設定するには、conf/analytics-agent.properties ファイルで ad.http.tls.version=TLSv1.2 を指定します。「Analytics エージェントのプロパティファイルの変更」を参照してください。

トラブルシューティングのヒント

  • analytics-agent.properties のプロパティが正しく設定されていることを確認します。「有効なジョブファイルの制限」を参照してください。
  • JRE バージョンが 1.7 以降であること、および環境で JAVA_HOME 変数が設定されていることを確認します。
  • analytics-agent/conf/analytics-agent.vmoptions のすべてのプロパティは JRE と互換性があります。