Apigee Edge のドキュメントを表示しています。
Apigee X のドキュメントを表示します。
Sosreport は、オープンソース ソフトウェアの SoS をベースにした、システムレベルの診断およびデータ収集ツールです。Sosreport ツールを使用すると、Apigee コンポーネントが実行されているノードの問題をデバッグできます。このツールはノードのファイル システムに情報を収集し、ローカルに保存します。
Sosreport ツールは、システムから構成の詳細、システム情報、診断情報を収集し、そのデータをアーカイブに保存します。Apigee コンポーネントの場合、Sosreport で次の情報が収集されます。
- 実行中のカーネル バージョン
- 読み込まれたモジュール
- システムとサービスの構成ファイル
Sosreport では、外部プログラムを実行して次のような情報を収集することもできます。
- すべてのコンポーネントの Apigee ログ
- ランタイム診断
- nodetool コマンドを使用して Cassandra 診断を収集。
Sosreport ツールには 2 つの主要なコマンドが含まれています。
sosreport
: データの収集とレポート作成の主なコマンドapigee-sosreport
:sosreport
をインストールし、Apigee コンポーネントに固有のsosreport
プラグインを管理するために使用される補助ツール。
インストール
このセクションでは、sosreport
のインストール方法について説明します。
SoS バージョンの sosreport
がすでにインストールされている場合
元の SoS バージョンの sosreport
がすでにシステムにインストールされている場合は、インストール パスが競合する可能性があるため、Apigee のバージョンを設定しないでください。代わりに、次のようなコマンドを使用して、ディレクトリ /opt/apigee/apigee-sosreport/source/plugin
から Apigee 固有のプラグインを適切な Python site-packages
ディレクトリにコピーします。
たとえば、agigee-mgmt.py
をコピーするには、次のコマンドを実行します。
- Python 2 を使用している場合は、次のように入力します。
sudo cp apigee-mgmt.py /usr/lib/python2.7/site-packages/sos/plugins/
- Python 3 を使用している場合は、次のように入力します。
sudo cp apigee-mgmt.py /usr/local/lib/python3.6/site-packages/sos/plugins/
プラグインがインストールされていることを確認するには、次のように入力します。
sudo sosreport --list-plugins
ご不明な点がございましたら、Apigee サポートにお問い合わせください。
Apigee の sosreport
のバージョンをインストールする
sosreport
の SoS バージョンがまだシステムにインストールされていない場合は、Edge for Private Cloud がインストールされているすべてのノードで、次のコマンドを入力して Apigee のバージョンをインストールできます。
/opt/apigee/apigee-service/bin/apigee-service apigee-sosreport install
/opt/apigee/apigee-service/bin/apigee-service apigee-sosreport setup
sosreport
がインストールされているかどうかをテストするには、Apigee に関連するプラグインが次のディレクトリにあることを確認します。
/usr/lib/pythonx.x/site-packages/sos/plugins
ここで、pythonx.x
はインストールされている Python のバージョンです。
または、次のいずれかのコマンドを実行します。
- Apigee 固有のプラグインのみを確認するには:
apigee-service apigee-sosreport diagnose -l
これにより、Apigee 固有のプラグインの次のリストが返されます。
sosreport (version 3.9) The following plugins are currently enabled: apigee-mgmt This is the apigee plugin for edge-management-server apigee-mp This is the apigee plugin for edge-message-processor apigee-rrt This is the apigee plugin for edge-router apigee-sample Main diagnostics gatehring class
- すべてのプラグインを確認するには:
apigee-service apigee-sosreport diagnose -s -l
sosreport で使用可能なプラグインのリストを以下に示します。
sosreport (version 3.9) The following plugins are currently enabled: acpid ACPI daemon information alternatives System alternatives anacron Anacron job scheduling service apigee-cassandra This is the base class for sosreport plugins. Plugins should subclass this and set the class variables where applicable. ←truncated→ apigee-mgmt This is the base class for sosreport plugins. Plugins should subclass this and set the class variables where applicable. ←truncated→ apigee-mp Main diagnostics gathering class apigee-rrt This is the base class for sosreport plugins. Plugins should subclass this and set the class variables where applicable. ←truncated→ …………………………………………………. …………………………………………………. …………………………………………………. ←truncated→
レポートの作成
Sosreport ツールを使用してレポートを作成するには、必要なプラグイン オプションを指定して sosreport
コマンドを実行します(Apigee プラグインをご覧ください)。レポートが保存されるデフォルトのディレクトリは、tmp
または /var/tmp
です。別のディレクトリを tmp-dir
オプションに渡すことで、レポートを保存するディレクトリを変更できます。たとえば、Management Server でレポートを作成して my_report-dir
という名前のディレクトリを保存するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mgmt --batch --tmp-dir=my_report-dir
- SoSreport の SoS バージョンを使用:
sudo sosreport -o apigee-mgmt --batch --tmp-dir=my_report-dir
レポートは、tmp-dir
オプションを使用して指定したディレクトリの .tar.xz
ファイルに保存されます。.tar.xz
ファイルの場所は、STDOUT とチェックサムに表示されます。次に例を示します。
Your sosreport has been generated and saved in: /var/sosreport-prc-test-0-9613-2021-07-12-orwxufx.tar.xz The checksum is: 5a8b97c6020346a688254c8b04ef86ec For more available options for sosreport, read the man file: sudo man sosreport
レポートは、tmp-dir
オプションを使用して指定したディレクトリの .tar.xz
ファイルに保存されます。.tar.xz file
の場所とチェックサムは、STDOUT
に表示されます。次に例を示します。
sosreport
でその他のオプションについては、man
ファイルをご覧ください。
sudo man sosreport
Apigee プラグイン
以下のセクションでは、次のコンポーネントの Sosreport ツールに対する Apigee プラグインについて説明します。
管理サーバー
apigee-mgmt
プラグインは、Management Server から次の情報を収集します。
- サーバーのホスト名(デフォルト)
- cpuinfo(デフォルト)
- meminfo(デフォルト)
- Java 仮想マシン(JVM)の設定(メモリ、
Djdk.tls.allowUnsafeServerCertChange
など)(デフォルト) - 現在の管理ログ(デフォルト)
- 10 個の順次トップセットと jstacks の出力(デフォルト)
- 管理ログフォルダ全体(省略可)
- config-files(省略可)
例:
デフォルトのアイテムをすべて収集するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mgmt --batch my_report-dir
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-mgmt --batch my_report-dir
構成ファイルとすべてのログなど、すべてのデフォルト アイテムとコマンドで指定されたオプション アイテムも収集するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mgmt --batch -k apigee-mgmt.config-files -k apigee-mgmt.all-logs
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-mgmt --batch -k apigee-mgmt.config-files -k apigee-mgmt.all-logs
すべてを収集するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mgmt --batch -k apigee-mgmt.config-files -k apigee-mgmt.all-logs
または、次のように入力します。
sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mgmt --batch -a
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-mgmt --batch -k apigee-mgmt.config-files -k apigee-mgmt.all-logs
または、次のように入力します。
sudo sosreport -o apigee-mgmt --batch -a
Message Processor
apigee-mp
プラグインは、Management Processor(MP)から次の情報を収集します。
- サーバーのホスト名(デフォルト)
- cpuinfo(デフォルト)
- meminfo(デフォルト)
- buildinfo/release 情報(デフォルト)
- apigee-all ステータス(デフォルト)
- サーバーの詳細(デフォルト)
- JVM レベルの設定(メモリ、
Djdk.tls.allowUnsafeServerCertChange
など)(デフォルト) - 現在の MP ログ(デフォルト)
- 10 個のシーケンシャル トップ、jstack、NIO 指標出力(デフォルト)
- MP ログフォルダ全体(省略可)
- 分類ツリー(省略可)
- ヒープダンプ(省略可)
- config-files(省略可)
- ランタイム トレース(省略可。
org:env:api:rev detail
が指定されている場合のみ)。注: プラグインは、ランタイム リクエストを収集するまで 25 秒待機します。
例:
デフォルトのアイテムをすべて収集するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mp --batch
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-mp --batch
すべてのデフォルトのアイテムに加えて、収集するオプションのアイテムを指定することもできます。たとえば、フラグ -k apigee-mp.heap
を使用してヒープダンプを指定するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mp --batch -k apigee-mp.heap
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-mp --batch -k apigee-mp.heap
同様に、次のオプション項目も指定できます。
-k apigee-mp.deployments -k apigee-mp.heap -k apigee-mp.all-logs -k apigee-mp.config-files -k apigee-mp.trace=gsc-cps:test:httpbin:3
1 つのコマンドで複数のオプションを指定できます。次に例を示します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mp --batch -k apigee-mp.deployments -k apigee-mp.all-logs
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-mp --batch -k apigee-mp.deployments -k apigee-mp.all-logs
トレース以外をすべて収集するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-mp --batch -a
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-mp --batch -a
ルーター
apigee-rrt
プラグインは、Router から次の情報を収集します。
- サーバーのホスト名(デフォルト)
- cpuinfo(デフォルト)
- meminfo(デフォルト)
- buildinfo/release 情報(デフォルト)
- apigee-all ステータス(デフォルト)
- サーバーの詳細(デフォルト)
- ps の出力。これにより、JVM レベルの設定(メモリ、Djdk.tls.allowUnsafeServerCertChange など)(デフォルト)が提供されます。
- 現在の Router のログ(デフォルト)
- 不正なファイル名を含む vhost ファイル名のリスト(デフォルト)
- Router ログフォルダ全体(省略可)
- config-files(省略可)
例:
デフォルトのアイテムをすべて収集するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-rrt --batch
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-rrt --batch
すべてのデフォルトのアイテムに加えて、収集するオプションのアイテムを指定することもできます。たとえば、フラグ -k apigee-rrt.all-logs
を使用してログフォルダ全体を指定するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-rrt --batch -k apigee-rrt.all-logs
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-rrt --batch -k apigee-rrt.all-logs
同様に、次のオプション項目も指定できます。
-k apigee-rrt.all-logs -k apigee-rrt.config-files
すべてのデータを収集するには:
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-rrt --batch -a
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-rrt --batch -a
Cassandra
apigee-cassandra
プラグインは、Cassandra ノードから次の情報を収集します。
- マシンの統計情報:
"hostname -i" "cat /proc/cpuinfo" "cat /proc/meminfo" "ulimit -a" "ps auxw" "df -kh" "du -sh" "netstat -ntlpu" "free -h" "ifconfig -h" "ps -ef"
- Apigee コンポーネントのステータスとバージョン apigee-all バージョンと apigee-all ステータス
- apigee-cassandra のログ:
/opt/apigee/var/log/apigee-cassandra/
内のすべてのファイル - commit ログ数
- コマンド Top の出力
- スレッドダンプ
- 構成ファイル:
cassandra-topology.properties
、cassandra.yaml
、cassandra-env.sh
- version、status、ring、info、gossipinfo、compressionstats -H、tpstats、netstats、cfstats、proxy ヒストグラムの Nodetool の出力
例:
デフォルトのアイテムをすべて収集するには、次のいずれかを入力します。
- Apigee の
sosreport
のバージョンを使用している場合:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-cassandra
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-cassandra