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

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

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

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

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

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 アプリケーション エージェント

Analytics にアクセスし、アプリケーションからトランザクションデータを収集するには、サポートされているアプリケーション サーバ エージェント(Node.js Agent または PHP Agent など)のバージョンをすべての環境に展開する必要があります。Splunk AppDynamics APM を使用している場合は、エージェントがご使用の環境にすでにインストールされている可能性があります。

Install the Standalone Analytics Agent on Windows

As described in Analytics Deployment Options, the Analytics Agent can run on the same host or on a different host from the app server agent, depending on your use case.

The Downloads Portal provides the following distribution archives:

  • Standalone Analytics Agent (no JRE)
  • Analytics Agent with JRE 1.8 for both 32-bit and 64-bit Windows machines
警告: Ensure that only the administrators can modify the Analytics Agent directory. Run the following command in the <analytics-agent-home> directory to provide administrator access.
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

Analytics エージェントの起動と停止

Windows で Analytics エージェントを起動または停止するには、Windows サービスメニューで次のコマンドを実行します。

エージェントを起動するには、次のコマンドを実行します。

bin\analytics-agent.exe service-start

エージェントを停止するには、次のコマンドを実行します。

bin\analytics-agent.exe service-stop

Analytics エージェントのアンインストール

Analytics エージェントをアンインストールするには、.exe uninstall コマンドを実行します。

bin\analytics-agent.exe service-uninstall

ローカル アプリケーション サーバ エージェント用の Analytics エージェントの有効化

このセクションは、アプリケーション サーバ エージェントと同じホストに Analytics エージェントをインストールしていることを前提としています。

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

分析エージェント展開図

<analytics-agent-home>/bin ディレクトリにある、.exe および analytics-agent.exe ファイルを含む Analytics エージェント。Analytics エージェントは Java で記述されているため、Java 仮想マシン(JVM)でエージェントを実行します。Analytics エージェントは Windows サービスとして実行されます。

リモート Analytics エージェントのアプリケーション サーバ エージェントの有効化

Windows で appdynamics.analytics.agent.url という名前の環境変数を使用してリモート Analytics エージェントの場所を指定するには、次の手順を実行します

  1. Windows マシンで、[System Properties] > [Advanced system settings] > [Environment Variables] に進みます。
  2. [System Variables] で [New] をクリックします。Splunk AppDynamics では、ユーザー環境変数アプローチではなく、システム環境変数アプローチを推奨しています。環境変数アプローチでは、ユーザーはすべてのインストゥルメント化済みアプリケーションを実行しているユーザーと同じ権限を持っている必要があります。
  3. appdynamics.analytics.agent.url システム環境変数の値を http://<analytics-agent-ip>:9090/v2/sinks/bt に設定します。<analytics-agent-ip> を、ご使用の環境の Analytics エージェントのホスト名に置き換えます。
    新しいシステム変数
  4. 新しい環境変数を有効にする該当アプリケーションまたはプロセスを再起動します。マシンを再起動する必要はありませんが、モニター対象プロセスを呼び出す親プロセスは再起動する必要があります。Windows の w3wp の場合、環境変数に変更を加えた後、iisreset を実行して IIS を再起動します。

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

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

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

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

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

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

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

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

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

  1. テキストエディタで <analytics-agent-home>/conf/analytics-agent.properties ファイルを開きます。
  2. 指示に従って、スタンドアロン Analytics エージェントを有効にします。

Analytics エージェントの起動と停止

Analytics エージェントは、コマンドラインで直接開始および停止できます。

エージェントを起動するには、次のコマンドを実行します。

<analytics agent executable> start

エージェントを停止するには、次のコマンドを実行します。

<analytics agent executable> stop

読み取り専用ファイルシステムからの Analytics エージェントの実行

このデプロイでは、Analytics エージェントをインストールし、読み取り専用ファイルシステムから実行します。これを行うには、ログファイルを書き込み可能なパーティションに書き込むように Analytics エージェントに指示する必要があります。

読み取り専用ファイルシステムでの Analytics エージェント

書き込み可能なファイルシステムで Analytics エージェントのディレクトリを作成し、読み取り専用ファイルシステム内の Analytics エージェントのコンテンツへのシンボリックリンクを作成します。これにより、Analytics エージェントの書き込み可能な最上位ディレクトリと、その最上位ディレクトリの下にある書き込み可能なログディレクトリが作成されます。

読み取り専用ディレクトリ内のアーティファクトを使用して、別の書き込み可能ディレクトリから Analytics エージェントを実行するには、次の手順を実行します。

  1. 読み取り専用 Analytics エージェントディレクトリに対して必要な権限を指定します。
    # analytics-agent-readonly refers to the read-only analytics agent.
    chmod -R 555 /tmp/analytics-agent-readonly/
  2. 書き込み可能なファイルシステムで Analytics エージェントのディレクトリを作成します。
    mkdir /tmp/analytics-agent-writable
    chmod 755 analytics-agent-writable/
    cd /tmp/analytics-agent-writable
  3. 読み取り専用ファイルシステム内の Analytics エージェントのコンテンツへのシンボリックリンクを作成します。
    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. その最上位ディレクトリの下に、書き込み可能な conf ディレクトリを作成します。
    cd /tmp/analytics-agent-writable
    mkdir conf
    chmod 755 conf/
    cd conf
  5. conf ディレクトリのコンテンツへのシンボリックリンクを作成します。
    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. analytics-agent-writable ディレクトリの下に logs ディレクトリを作成します。
  7. writable ディレクトリから Analytics エージェントを実行します。
    cd /tmp/analytics-agent-writable
    nohup bin/analytics-agent.sh start &
  8. 結果のディレクトリは次のようになります。
    /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

リモート Analytics エージェントのアプリケーション サーバ エージェントの有効化

ほとんどの設定では、アプリケーション サーバ エージェントと同じマシンに Analytics エージェントをインストールします。Analytics エージェント拡張機能のインストールなどの特定の設定では、別のマシンが必要です。

  1. -D パラメータを使用してリモート Analytics エージェントの場所を指定します。この引数は、次のようにモニター対象アプリケーションに渡します。
    -Dappdynamics.analytics.agent.url=http://<analytics-agent-ip>:9090/v2/sinks/bt
  2. <analytics-agent-ip> を、ご使用の環境の Analytics エージェントのホスト名に置き換えます。

Enable the Standalone Analytics Agent

In this deployment, the Analytics Agent and app server agent runs on the same machine. The Analytics Agent reads and transmits log data from log files on the host machine. The app server agent transmits data from the monitored application to the Analytics Agent.

Machine with Analytics Agent and App Server Agent

In environments where a Machine Agent is not installed, follow these steps to install the Analytics Agent as a standalone agent:

  1. Unzip the Analytics Agentdistribution archive to the installation directory on each target host. When you unzip this archive, you get three directories:
    • bin : contains the binary file for Linux, Solaris, and OSX
    • lib : contains all the jar files that need to be in the classpath
    • conf : contains all the configuration files, such as the properties and vmoptions files
  2. Open the following file to configure connectivity from the Analytics Agent to the Events Service.
    <analytics-agent-home>/conf/analytics-agent.properties
  3. In the analytics-agent.properties file, do the following:
    • Change the default URL and, if necessary, the port number to connect the Events Service by modifying the http.event.endpoint value. For example:

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

      For SaaS-based installations, see SaaS Domains and IP Ranges for host and port details.

      If your firewall rules use IP addresses, review firewall considerations in Troubleshoot Analytics Agent Issues. For on-premises installations, use any host and port that you have configured. In clustered environments, this is often a load balancer.

    • Change the default URL and the port number to point to the Controller by modifying the ad.controller.url property. For example:

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

      This is the URL and the port number you use to access the Controller UI.

  4. The Global Account Name and Access Key values are found under View License in the Controller.
  5. Configure the account and account key for which the agent should publish the business transaction data. Use theThe http.event.accountName http.event.accessKey http.event.name customer1 analytics-agent.log Global Account Name and Access Key values you have collected earlier. For example:
    # 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>
    The http.event.accountName property specifies the Global Account Name of the account. The http.event.accessKey property specifies the Access Key, which provides an authentication mechanism between the Controller and the components of the Application Analytics deployment. The Controller installation process generates the Access Key value.For SaaS-based installations, set the http.event.name property to Name of the account. The default value is customer1. If the property is not configured correctly, the Analytics Agent will not be able to authenticate. The resulting errors are stored in the analytics-agent.log file.
  6. If you are collecting log information on this host, you need to:
  7. Save and close the file.
  8. Start the Analytics Agent by running the following command.
    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 オプションの変更)について説明します。

プロキシ経由でのイベントサービスへの接続

Analytics エージェントがプロキシサーバーを介してイベントサービスに接続する必要がある場合は、次の手順を実行します。

  1. テキストエディタで <analytics-agent-home>\conf\analytics-agent.properties を開きます。
  2. 次の情報を追加します。
    # 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. ファイルを保存して、閉じます。

統合ログ管理用の 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

Java 仮想マシンのオプションの変更

JVM の起動オプションを変更する必要がある場合は、テキストエディタを使用して <analytics-agent-home>/conf/analytics-agent.vmoptions を変更します。

vmoptions ファイルの名前は ad.jvm.options.name=analytics-agent.vmoptions プロパティファイルから読み取られます。vmoptions ファイルの名前を変更する場合は、ad.jvm.options.name プロパティも変更する必要があります。

Analytics エージェント Windows サービスがインストールされていて、プロパティファイルまたは vmoptions ファイルを変更する必要がある場合は、変更を有効にするためにサービスをアンインストールして再インストールする必要があります。

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

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

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

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

Analytics エージェントのステータスの確認

Analytics エージェントが起動したことを確認するには、アプリケーション エージェントのログファイルで「Started [Analytics] collector」のエントリを検索します。

プロキシサーバを介してイベントサービスに接続するには、「プロキシ経由でエージェントをイベントサービスに接続する」を参照してください。

その他の設定

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 と互換性があります。