分析の問題のトラブルシューティング
このページでは、アプリケーション分析の特定のシナリオにおける展開の問題と回避策に関する一般的なトラブルシューティング手法について説明します。
General Troubleshooting Issues
If you encounter problems with your Analytics deployment, check the logs for errors and warnings.
These logs are useful to:
- Determine if the Analytics Dynamic Service is enabled or disabled.
- Determine if the Analytics Dynamic Service encounters errors sending messages to the Analytics Agent. For example, when the Analytics Dynamic Service is not able to communicate with the Analytics Agent due to invalid connection configuration.
- Determine if messages are being dropped by the Analytics Dynamic Service because its internal buffers are full.
- View the configurations used on startup.
The following components write log information.
- Analytics Agent: The Analytics Agent writes log messages to files in the
<analytics_agent_home>/logsdirectory. - Events Service: The Events Service writes log messages to files in the
<events_service_home>/logsdirectory. Theevents-service-api-store.logfile can help with troubleshooting. - Java Agent: The Analytics Dynamic Service is built into the Java Agent and writes logs to the same file as the app agent. The logs are in the
<application_home>/<app_agent_home>/logsdirectory.- The primary log file to use for troubleshooting is the file named
agent.<timestamp>.log. Search the file for messages written by the Analytics Dynamic Service.
- The primary log file to use for troubleshooting is the file named
- .NET Agent: The .NET Agent writes log messages to files in the
%ProgramData%\AppDynamics\DotNetAgent\Logsdirectory. By default, the .NET Agent writes Analytics logs from thecom.appdynamics.ee.service.analytics.Analyticslogger to determine if the Analytics Dynamic Service is enabled/disabled and to view the configuration on startup. Errors are logged in thewarnfile.- The
com.appdynamics.CONFIG.AnalyticsDynamicServiceConfigListenerlogger gathers Analytics Dynamic Service configuration details from the Controller. Ensure that theeventServiceURLcomes from the Controller. - The
com.appdynamics.analytics.EventsServiceSinklogger provides information about the communication between the .NET Agent and the Events Service.
- The
設定の問題
構成設定が必要なアカウント名とキーを使用して適切に設定されていることを確認します。アカウント名とキー値のスラッシュはエスケープする必要があります。
Windows コマンド
Windows では、Analytics エージェントがファイルからログデータを収集している間、del コマンドを使用してログファイルを削除できません。
Windows では、robocopy コマンドを使用してファイルを移動しないでください。Splunk AppDynamics では、代わりに move コマンドを使用することを推奨しています。
Analytics エージェントの起動に関する問題
Analytics エージェントを JRE 1.8.0_171 以降を使用してマシンエージェントの拡張機能として実行している場合、暗号化されたログイン情報を使用して Analytics エージェントを起動することはできません。回避策は次のとおりです。
- マシンエージェントで暗号化を無効にする
- 暗号化を有効にしたスタンドアロン Analytics エージェントを使用する
- JRE 1.8.0_162 を使用して、暗号化を有効にしたマシンエージェントを実行する
PID ファイル
Analytics エージェントのインスタンスが終了し、プロセス ID ファイル(PID ファイル)が残されると、次のエージェントの起動は、以下のエラーにより失敗します。
java.lang.RuntimeException: Unable to create file [D:\AppDynamics\analytics-agent\analytics-agent.id] to store the process id because it already exists. Please stop any currently running process and delete the process id file
エージェントの起動時に -f フラグオプションを使用できます。このオプションを使用すると、既存のプロセス ID ファイルが削除されます。Windows サービスとしてエージェントを起動する場合、このフラグは不要です。
-f フラグを次のように使用します。
- UNIX タイプ OS:
start -f - Windows CLI:
start -f
-f フラグオプションは、スタンドアロンの Analytics エージェントでのみ機能します。このオプションは、マシンエージェントに組み込まれた Analytics エージェントでは機能しません。マシンエージェントのバージョン 20.6 以降では、バンドルされている Analytics エージェントが PID ファイルをドロップしなくなりました。
マシンエージェント内(組み込みモード)で実行されている Analytics エージェントの場合は、マシンエージェントを 20.6 にアップグレードします。エージェントがクラッシュしていた以前の実行から PID ファイルを削除する必要がなくなりました。
Analytics エージェントを使用しないトランザクション分析(エージェントレス分析)で CPU 使用率が高くなる
トランザクション分析ライセンスの制限に達すると、古い Java エージェントで CPU 使用率が高くなることがあります。Splunk AppDynamics では、Java エージェントバージョン 20.3 以降にアップグレードすることを推奨しています。.NET エージェントで CPU とメモリの使用率が高いかどうかを確認します。
Analytics Data Issues
Clock Management
Splunk AppDynamics recommends maintaining clock-time consistency throughout your monitored environment. If Analytics metrics are consistently reporting zero, confirm that clocks are synchronized across the application, Controller, and Events Service nodes.
Timestamps
There are potentially four time zones involved with Log Analytics:
- The timestamp and time zone from the log file.
- The event timestamp and pickup timestamp time zones can be different from those in the log for a number of reasons:
- When the time zone is overridden.
- The time zone is not provided correctly in the log.
- The timestamp and time zone parsing goes awry.
- When no time zone is specified in the log timestamp, then local time is assumed.
- The Events Service time zone and the Events Service stores all timestamps in UTC time.
- The browser used to view the Analytics data in the Controller UI (such as the Event Timestamp column in the UI search results or the Time Picker widget) converts all timestamps to the browser's local time.
Environment Variables
If you are not seeing or only seeing partial Analytics data in the Controller, configure the following environment variables.
| Environment Variable | Description |
|---|---|
appdynamics.analytics.agent.send.attempt.max
| The maximum number of times that the Dynamic Service running in the agent will try sending the Analytics data after a communication failure. |
appdynamics.analytics.agent.send.attempt.pauseMillis
| The wait time between attempts to send Analytics data to the Analytics Agent after a communication failure. |
appdynamics.analytics.numOfSinkWriterTasks
| The number of sinks used by the Dynamic Service running in agent to send data to Analytics Agent. The default number is 2 and can be increased as needed. |
ログ分析の欠落フィールドの抽出に関する問題
ソースルール設定に従い表示される予定のフィールドがログ分析データにない場合、またはフィールド抽出で正規表現(grok パターンを含む)を使用している場合は、パフォーマンスの保護が発生している可能性があります。
正規表現パターンとログ行の照合が 5 秒よりも長くかかる場合、フィールドの抽出試行は終了します。抽出されたフィールドを必要とする後続の処理は行われません。その結果、一部のフィールドが、そのログ行をコントローラで表示したときに欠落する場合があります。この場合、次のエラーメッセージが Analytics エージェントのログに表示されます。
[ERROR ] java.util.concurrent.TimeoutException: The current regex has spent 5 seconds attempting to match the log line, further processing has been stopped for this log line.
フィールドが欠落するもう 1 つの理由は、ログ行に、パターンで定義されているとおりに抽出されるフィールドが含まれていない場合です。
カスタム分析メトリックの問題
analytics.scheduledqueries.batch.size コントローラ設定を使用してサイズを増やすことができます。この設定のデフォルト値は 5 です。
設定へのアクセスについては、「2023-10-19_05-04-05_管理コンソールへのアクセス」を参照してください。
ビジネス トランザクション イベントの制限
Analytics Dynamic Service は、要求本文がイベントセグメントの配列であるメッセージをイベントサービスに送信します。ビジネス トランザクション イベントは、ビジネストランザクションの requestGUID によって相互に関連付けられる 1 つ以上のセグメントで構成されます。次のようなメッセージに関連する取り込みの制限があります。
-
イベント(セグメント)サイズ:Analytics Dynamic Service によって収集される個々のビジネス トランザクション セグメントの最大サイズは 0.1 MB です。この制限は、
appdynamics.analytics.message.maxSizeBytesJava システムプロパティによって定義されます。この値を変更するには、Java エージェントが起動したときに、コマンドラインでシステムプロパティとして値を渡します。例:'-Dappdynamics.analytics.message.maxSizeBytes=1024000' -
要求あたりのイベント数:要求あたりのセグメントの最大数は、
appdynamics.analytics.agent.send.batch.items.maxJava システムプロパティによって定義されます。このプロパティのデフォルト値は 16 です。この値を変更するには、Java エージェントが起動したときに、コマンドラインでシステムプロパティとして値を渡します。 - メッセージサイズ:この制限は、イベントサービスに送信される単一の要求本文のサイズの制限です。要求本文は、通常、イベントセグメントの配列です。すべてのイベントタイプのパブリッシュ要求は 1 MB に制限されます。制限を超えると、エージェントのログファイルとイベントサービスログのメッセージで例外が示されます。
エージェント側のメトリック
Java エージェントの Analytics コンポーネントは、パフォーマンスメトリックをレポートします。これらのメトリックを使用して、エージェントおよびノードのトランザクション分析レポートの正常性をモニタできます。メトリックブラウザでこれらのメトリックは、Agent|Analytics|<Metric Name> パスの下に表示されます。
| メトリック名 | メトリック時間ロールアップタイプ | メトリック クラスタ ロールアップ タイプ | メトリックの説明 |
|---|---|---|---|
| Collector Objects Count | 現在 | 個人 | 使用中の Analytics データコレクタの現在の数。 |
| 送信メッセージ(Messages Sent) | 合計 | Collective | 送信されたメッセージの数。 |
| Messages Dropped Since Input Queue Full | 合計 | Collective |
入力キューがいっぱいであるためにドロップされたメッセージの数。 |
| Messages Dropped Since Size Exceeded | 合計 | Collective |
メッセージサイズが制限を超えたためにドロップされたメッセージの数。 |
| Message Send Errors | 合計 | Collective | イベントの登録またはパブリッシュにおける一時的および永続的なエラーの数。 |
|
Message Latency(ms) | 平均 | 個人 | 計算された遅延(ミリ秒) |
| Pending Messages In Queue | 現在 | 個人 | バッファで保留中のメッセージ。 |
| Sink Writers Count | 現在 | 個人 | アクティブなシンクライタスレッドの数。 |
Firewall Considerations
Transaction Analytics without an Analytics Agent requires a connection between the Java/.NET Agent and the Events Service. If you have a firewall that blocks requests from the Java/.NET Agent to the SaaS or on-premises Events Service, you need to open the firewall to avoid gaps in Analytics data. See Port Settings and Agent-to-Controller Connections.
For SaaS-based installations, configure the Analytics endpoint by modifying the http.event.endpoint setting in the \conf\analytics-agent.properties file (as described in Install Agent-Side Components). For example, http.event.endpoint=http://analytics.api.appdynamics.com:443.
If your firewall rules require you to use specific IP addresses, rather than hostnames, note the following information. If you are unable to see Transaction Analytics data collected as expected (even after configuring your firewall rules) and you see repetitive Connection Reset messages in the logs similar to the following, your firewall rules may not include the correct IP addresses.
[2015-12-18T16:08:39,907-06:00] [INFO ] [AD Thread Pool-Global0] [o.a.http.impl.execchain.RetryExec] I/O exception (java.net.SocketException) caught when processing request to {s}->https://analytics.api.appdynamics.com:443: Connection resetYour firewall rules may not include the correct IP addresses.
In SaaS environments, analytics.api.appdynamics.com, fra-ana-api.saas.appdynamics.com, and syd-ana-api.saas.appdynamics.com are round-robin DNS aliases and may resolve to multiple DNS (54. vs 52.) in the following examples.
Name: analytics.api.appdynamics.com Address: 54.213.173.141 Name: analytics.api.appdynamics.com Address: 52.88.111.157Name: fra-p-con-2.saas.appdynamics.com Address: 52.28.42.67 Name: fra-p-con-2.saas.appdynamics.com Address: 52.57.96.225Name: syd-p-con-1.saas.appdynamics.com Address: 54.153.248.179 Name: syd-p-con-1.saas.appdynamics.com Address: 54.153.246.219>Amazon Web Services (AWS) controls the IPs used, so they may change from time to time. AWS publishes its current IP address ranges in JSON format, so if you are unable to open firewalls to hostnames, you can download the AWS IP address ranges. If you want to be notified whenever there is a change to the AWS IP address ranges, you can subscribe to receive notifications using Amazon SNS.
See Analytics IP Ranges for the AWS regions for the SaaS Analytics environments. You can view the AWS IP Ranges for each listed region.