現在、Apigee Edge のドキュメントを表示しています。
Apigee X のドキュメントをご確認ください。 情報
Sosreport は、オープンソース ソフトウェアの SoS をベースとした、システムレベルの診断およびデータ収集ツールです。Sosreport ツールを使用すると、Apigee コンポーネントが実行されているノードの問題をデバッグする際に役立つ情報を収集できます。このツールは、情報を収集して、ノードのファイル システムにローカルに保存します。
Sosreport ツールは、構成の詳細、システム情報、診断情報をシステムから収集し、アーカイブに保存します。Apigee コンポーネントの場合、Sosreport は以下を収集します。
- 実行中のカーネル バージョン
- 読み込まれたモジュール
- システム構成ファイルとサービス構成ファイル
Sosreport は、次のような追加情報を収集する外部プログラムも実行します。
- すべてのコンポーネントからの Apigee ログ。
- ランタイム診断
- nodetool コマンドで収集された Cassandra 診断。
Sosreport ツールには、主に 2 つのコマンドがあります。
sosreport
: データの収集とレポートの作成のための主要なコマンド。apigee-sosreport
:sosreport
のインストールと、Apigee コンポーネント固有のsosreport
プラグインの管理に使用する補助ツール。
インストール
このセクションでは、sosreport
のインストール方法について説明します。
sosreport
の SoS バージョンがすでにインストールされている場合
元の SoS バージョンの sosreport
がすでにシステムにインストールされている場合は、インストール パスが競合する可能性があるため、Apigee のバージョンを設定しないでください。代わりに、以下のようなコマンドを使用して、Apigee 固有のプラグインをディレクトリ /opt/apigee/apigee-sosreport/source/plugin
から適切な 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
- SoS バージョンの sosreport を使用する場合:
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(デフォルト)
- メモリ、
Djdk.tls.allowUnsafeServerCertChange
などの Java 仮想マシン(JVM)の設定(デフォルト) - 現在の管理ログ(デフォルト)
- 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
プラグインは、管理プロセッサ(MP)から次の情報を収集します。
- サーバーのホスト名(デフォルト)
- cpuinfo(デフォルト)
- meminfo(デフォルト)
- buildinfo/release info(デフォルト)
- apigee-all のステータス(デフォルト)
- サーバーの詳細(デフォルト)
- メモリ、
Djdk.tls.allowUnsafeServerCertChange
などの JVM レベルの設定(デフォルト) - 現在の 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 info(デフォルト)
- apigee-all のステータス(デフォルト)
- サーバーの詳細(デフォルト)
- 出力します。これにより、メモリ、Djdk.tls.allowUnsafeServerCertChange など(デフォルト)などの JVM レベルの設定が提供されます。
- 現在の 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
- 次のパラメータの Nodetool 出力: version、status、ring、info、gossipinfo、compacionstats -H、tpstats、netstats、cfstats、proxyhistograms
例:
すべてのデフォルトのアイテムを収集するには、次のいずれかを入力します。
- Apigee の
sosreport
バージョンの使用:sudo sosreport --config-file /opt/apigee/apigee-sosreport/conf/sos.conf -o apigee-cassandra
- SoS バージョンの
sosreport
を使用する場合:sudo sosreport -o apigee-cassandra