Skip to main content
日本語は機械翻訳による参考訳です。内容に矛盾や不一致があった場合には、英語の内容が優先されます。

ログ収集の設定

共同作成者

イーサネットスイッチヘルスモニタ(CSHM)は、クラスタネットワークスイッチとストレージネットワークスイッチの動作の健全性を確認し、デバッグ用にスイッチのログを収集します。この手順では、収集を設定し、詳細な*サポート*ログを要求し、AutoSupportによって収集される*定期的*データの1時間ごとの収集を有効にするプロセスをガイドします。

注: FIPSモードを有効にする場合は、次の手順を実行する必要があります。

メモ
  1. ベンダーの指示に従って、スイッチでSSHキーを再生成します。

  2. を使用して、ONTAP側のsshキーを再生成します。 debug system regenerate-systemshell-key-pair

  3. を使用して、ログ収集セットアップルーチンを再実行します。 system switch ethernet log setup-password

作業を開始する前に

  • ユーザはスイッチコマンドにアクセスできる必要があります show 。これらが使用できない場合は、新しいユーザを作成し、必要な権限をユーザに付与します。

  • スイッチのヘルスモニタが有効になっている必要があります。これを確認するには、 Is Monitored: フィールドは、 system switch ethernet show コマンドを実行します

  • NVIDIAスイッチの場合、ログ収集のユーザがパスワードプロンプトを表示せずにログ収集コマンドを実行できるようにする必要があります。この使用を許可するには、次のコマンドを実行します。 echo '<username> ALL = NOPASSWD: /usr/cumulus/bin/cl-support, /usr/sbin/csmgrctl' | sudo EDITOR='tee -a' visudo -f /etc/sudoers.d/cumulus

手順

ONTAP 9.14.1以前
  1. ログ収集を設定するには、スイッチごとに次のコマンドを実行します。ログ収集用のスイッチ名、ユーザ名、およびパスワードの入力を求められます。

    system switch ethernet log setup-password
    cluster1::*> system switch ethernet log setup-password
    Enter the switch name: <return>
    The switch name entered is not recognized.
    Choose from the following list:
    cs1
    cs2
    
    cluster1::*> system switch ethernet log setup-password
    
    Enter the switch name: cs1
    Would you like to specify a user other than admin for log collection? {y|n}: n
    
    Enter the password: <enter switch password>
    Enter the password again: <enter switch password>
    
    cluster1::*> system switch ethernet log setup-password
    
    Enter the switch name: cs2
    
    Would you like to specify a user other than admin for log collection? {y|n}: n
    
    Enter the password: <enter switch password>
    Enter the password again: <enter switch password>
  2. サポートログ収集を要求し、定期収集を有効にするには、次のコマンドを実行します。これにより、詳細なログと1時間ごとのデータ収集の両方のタイプのログ収集が開始されます。 Support Periodic

    system switch ethernet log modify -device <switch-name> -log-request true
    cluster1::*> system switch ethernet log modify -device cs1 -log-request true
    
    Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y
    
    Enabling cluster switch log collection.
    
    cluster1::*> system switch ethernet log modify -device cs2 -log-request true
    
    Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y
    
    Enabling cluster switch log collection.

    10分待ってから、ログ収集が完了したことを確認します。

    system switch ethernet log show
ONTAP 9.15.1以降
  1. ログ収集を設定するには、スイッチごとに次のコマンドを実行します。ログ収集用のスイッチ名、ユーザ名、およびパスワードの入力を求められます。

    system switch ethernet log setup-password
    cluster1::*> system switch ethernet log setup-password
    Enter the switch name: <return>
    The switch name entered is not recognized.
    Choose from the following list:
    cs1
    cs2
    
    cluster1::*> system switch ethernet log setup-password
    
    Enter the switch name: cs1
    Would you like to specify a user other than admin for log collection? {y|n}: n
    
    Enter the password: <enter switch password>
    Enter the password again: <enter switch password>
    
    cluster1::*> system switch ethernet log setup-password
    
    Enter the switch name: cs2
    
    Would you like to specify a user other than admin for log collection? {y|n}: n
    
    Enter the password: <enter switch password>
    Enter the password again: <enter switch password>
  2. 定期的なログ収集を有効にします。

    system switch ethernet log modify -device <switch-name> -periodic-enabled true
    cluster1::*> system switch ethernet log modify -device cs1 -periodic-enabled true
    
    Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y
    
    cs1: Periodic log collection has been scheduled to run every hour.
    
    cluster1::*> system switch ethernet log modify -device cs2 -periodic-enabled true
    
    Do you want to modify the cluster switch log collection configuration? {y|n}: [n] y
    
    cs2: Periodic log collection has been scheduled to run every hour.
    
    cluster1::*> system switch ethernet log show
                                              Periodic    Periodic    Support
    Switch                                    Log Enabled Log State   Log State
    
    cs1                                       true        scheduled   never-run
    cs2                                       true        scheduled   never-run
    2 entries were displayed.
  3. サポートログ収集のリクエスト:

    system switch ethernet log collect-support-log -device <switch-name>
    cluster1::*> system switch ethernet log collect-support-log -device cs1
    
    cs1: Waiting for the next Ethernet switch polling cycle to begin support collection.
    
    cluster1::*> system switch ethernet log collect-support-log -device cs2
    
    cs2: Waiting for the next Ethernet switch polling cycle to begin support collection.
    
    cluster1::*> *system switch ethernet log show
                                              Periodic    Periodic    Support
    Switch                                    Log Enabled Log State   Log State
    
    cs1                                       false       halted      initiated
    cs2                                       true        scheduled   initiated
    2 entries were displayed.
  4. イネーブルメント、ステータスメッセージ、前回のタイムスタンプと定期収集のファイル名、要求ステータス、ステータスメッセージ、前回のタイムスタンプとサポート収集のファイル名など、ログ収集のすべての詳細を表示するには、次のコマンドを使用します。

    system switch ethernet log show -instance
    cluster1::*> system switch ethernet log show -instance
    
                        Switch Name: cs1
               Periodic Log Enabled: true
                Periodic Log Status: Periodic log collection has been scheduled to run every hour.
        Last Periodic Log Timestamp: 3/11/2024 11:02:59
              Periodic Log Filename: cluster1:/mroot/etc/log/shm-cluster-info.tgz
              Support Log Requested: false
                 Support Log Status: Successfully gathered support logs - see filename for their location.
         Last Support Log Timestamp: 3/11/2024 11:14:20
               Support Log Filename: cluster1:/mroot/etc/log/shm-cluster-log.tgz
    
                        Switch Name: cs2
               Periodic Log Enabled: false
                Periodic Log Status: Periodic collection has been halted.
        Last Periodic Log Timestamp: 3/11/2024 11:05:18
              Periodic Log Filename: cluster1:/mroot/etc/log/shm-cluster-info.tgz
              Support Log Requested: false
                 Support Log Status: Successfully gathered support logs - see filename for their location.
         Last Support Log Timestamp: 3/11/2024 11:18:54
               Support Log Filename: cluster1:/mroot/etc/log/shm-cluster-log.tgz
    2 entries were displayed.
注意 ログ収集機能によってエラーステータスが報告された場合(の出力に表示され `system switch ethernet log show`ます)、詳細については、を参照してください "ログ収集のトラブルシューティング"