この製品のマニュアルセットは、偏向のない言語を使用するように配慮されています。このマニュアルセットでの偏向のない言語とは、年齢、障害、性別、人種的アイデンティティ、民族的アイデンティティ、性的指向、社会経済的地位、およびインターセクショナリティに基づく差別を意味しない言語として定義されています。製品ソフトウェアのユーザーインターフェイスにハードコードされている言語、RFP のドキュメントに基づいて使用されている言語、または参照されているサードパーティ製品で使用されている言語によりドキュメントに例外が存在する場合があります。シスコのインクルーシブランゲージに対する取り組みの詳細は、こちらをご覧ください。
このドキュメントは、米国シスコ発行ドキュメントの参考和訳です。リンク情報につきましては、日本語版掲載時点で、英語版にアップデートがあり、リンク先のページが移動/変更されている場合がありますことをご了承ください。あくまでも参考和訳となりますので、正式な内容については米国サイトのドキュメントを参照ください。
システム メッセージ ロギングを使用すると、システム プロセスが生成するメッセージの宛先を制御し、重大度に基づいてメッセージをフィルタリングできます。端末セッション、ログ ファイル、およびリモート システム上の Syslog サーバへのロギングを設定できます。
システム メッセージ ロギングは RFC 3164 に準拠しています。システム メッセージのフォーマットおよびデバイスが生成するメッセージの詳細については、『 Cisco NX-OS System Messages Reference 』を参照してください。
デバイスはデフォルトで、端末セッションにメッセージを出力します。端末セッションへのロギングの設定については、「端末セッションへのシステム メッセージ ロギングの設定」を参照してください。
デバイスはデフォルトで、システム メッセージをログ ファイルに記録します。ファイルへのロギングの設定については、「ファイルへのシステム メッセージ ロギングの設定」を参照してください。
表3-1 で、システム メッセージに使用する重大度について説明します。重大度を設定すると、そのレベルとそれより下位レベルのメッセージが出力されます。
|
|
---|---|
デバイスは重大度 0、1、または 2 のメッセージのうち、最新の 100 メッセージを NVRAM ログに記録します。NVRAM へのロギングを設定することはできません。
メッセージを生成したファシリティとメッセージの重大度に基づいて、記録するシステム メッセージを設定できます。ファシリティについては、『 Cisco NX-OS System Management Command Reference, Release 4.0 』を参照してください。モジュールおよび重大度に基づく重大度の設定については、「記録するモジュールおよびファシリティ メッセージの設定」を参照してください。
syslog サーバは、syslog プロトコルに基づいてシステム メッセージを記録するように設定されたリモート システム上で動作します。最大 3 つの syslog サーバを設定できます。syslog サーバの設定については、「syslog サーバの設定」を参照してください。
(注) 最初のデバイス初期化時に、メッセージが syslog サーバに送信されるのは、ネットワークの初期化後です。
VDC(Virtual Device Context; 仮想デバイス コンテキスト)は、一連のシステム リソースに対応する論理表現です。システム メッセージ ロギングが適用されるのは、コマンドが入力された VDC に限られます。
VDC の設定については、次の URL にアクセスして、『 Cisco NX-OS Virtual Device Context Configuration Guide, Release 4.0 』を参照してください。
http://www.cisco.com/en/US/docs/switches/datacenter/sw/4_0/nx-os/virtual_device_context/configuration/guide/vdc_nx-os_book.html
|
|
---|---|
システム メッセージ ロギングにライセンスは不要です。ライセンス パッケージに含まれていない機能は、Cisco NX-OS システム イメージにバンドルされて提供されます。追加料金は発生しません。NX-OS ライセンス方式の詳細については、次の URL にアクセスして、『 Cisco NX-OS Licensing Guide, Release 4.0 』を参照してください。 http://www.cisco.com/en/US/docs/switches/datacenter/sw/4_0/nx-os/licensing/configuration/guide/nx-os_licensing.html |
• 「端末セッションへのシステム メッセージ ロギングの設定」
• 「記録するモジュールおよびファシリティ メッセージの設定」
(注) Cisco IOS CLI の詳しい知識がある場合は、この機能で使用する Cisco NX-OS コマンドが、よく使用される Cisco IOS コマンドとは異なる可能性があることに注意してください。
重大度に基づいて、コンソール、Telnet、および SSH セッションにメッセージを記録するようにデバイスを設定できます。
3. logging console [ severity-level ]
|
|
|
---|---|---|
指定された重大度とそれより上位の重大度のメッセージをコンソール セッションに記録するように、デバイスを設定します。重大度は 表3-1 に示したとおり、0 ~ 7 の範囲で指定できます。重大度を指定しなかった場合は、デフォルトの 2 が使用されます。 |
||
デバイスが指定された重大度とそれより上位の重大度のメッセージをモニタに記録できるようにします。この設定は、Telnet および SSH セッションに適用されます。重大度は 表3-1 に示したとおり、0 ~ 7 の範囲で指定できます。重大度を指定しなかった場合は、デフォルトの 2 が使用されます。 |
||
システム メッセージをファイルに記録するようにデバイスを設定できます。デフォルトでは、システム メッセージはファイル log:messages に記録されます。
ログ ファイルの表示および消去については、「ログ ファイルの表示および消去」を参照してください。
2. logging logfile logfile-name severity-level [ size bytes ]
no logging logfile [ logfile-name severity-level [ size bytes ]]
|
|
|
---|---|---|
システム メッセージを保管するログ ファイルの名前および記録する最小重大度を設定します。任意で最大ファイル サイズを指定できます。デフォルトの重大度は 5、ファイル サイズは 10485760 です。重大度は 表3-1 のとおりです。ファイル サイズの範囲は 4096 ~ 10485760 バイトです。 |
||
no logging logfile [ logfile-name severity-level [ size bytes ]] |
||
2. logging module [ severity-level ]
4. logging level facility severity-level
no logging level [ facility severity-level ]
5. show logging level [ facility ]
6. logging timestamp { microseconds | milliseconds | seconds }
no logging timestamp { microseconds | milliseconds | seconds }
|
|
|
---|---|---|
指定された重大度以上のモジュール ログ メッセージをイネーブルにします。重大度は 表3-1 に示したとおり、0 ~ 7 の範囲で指定できます。重大度を指定しなかった場合は、デフォルトの 5 が使用されます。 |
||
指定されたファシリティからの、指定された重大度以上のメッセージ ロギングをイネーブルにします。ファシリティについては、『 Cisco NX-OS System Management Command Reference, Release 4.0 』を参照してください。重大度は 表3-1 に示したとおり、0 ~ 7 の範囲で指定できます。すべてのファシリティに同じ重大度を適用する場合は、facility に all を使用します。デフォルトについては、 show logging level コマンドを参照してください。 |
||
指定されたファシリティのロギング重大度をデフォルトの重大度にリセットします。ファシリティおよび重大度を指定しなかった場合、すべてのファシリティがそれぞれのデフォルト重大度にリセットされます。 |
||
(任意)ファシリティ別に、ロギング レベルの設定およびシステム デフォルト レベルを表示します。ファシリティを指定しなかった場合は、すべてのファシリティのレベルが表示されます。 |
||
no logging timestamp { microseconds | milliseconds | seconds } |
||
システム メッセージの記録先であるリモート システムを参照する syslog サーバを 3 つまで設定できます。
(注) 管理 VRF(Virtual Routing and Forwarding)インスタンスを使用するものとして、syslog サーバを設定することを推奨します。VRF の詳細については『Cisco NX-OS Unicast Routing Configuration Guide, Release 4.0』を参照してください。次の URL にアクセスしてください。
http://www.cisco.com/en/US/docs/switches/datacenter/sw/4_0/nx-os/unicast/configuration/guide/l3_nxos-book.html
2. logging server host [ severity-level [ use_vrf vrf-name ]]
|
|
|
---|---|---|
logging server host [ severity-level [ use-vrf vrf-name ]] |
指定のホスト名または IPv4/IPv6 アドレスで syslog サーバを設定します。 use_vrf キーワードを使用すると、メッセージ ロギングを特定の VRF に限定できます。重大度は 表3-1 に示したとおり、0 ~ 7 の範囲で指定できます。デフォルトの発信ファシリティは local7 です。 |
|
/etc/syslog.conf ファイルに次の行を追加すると、UNIX または Linux システム上で syslog サーバを設定できます。
表3-2 で、ユーザが設定できる syslog フィールドについて説明できます。
UNIX または Linux システム上で syslog サーバを設定する場合、手順は次のとおりです。
ステップ 1 /etc/syslog.conf ファイルに次の行を追加することによって、ファシリティ local7 のデバッグ メッセージをファイル /var/log/myfile.log に記録します。
ステップ 2 シェル プロンプトに次のコマンドを入力し、ログ ファイルを作成します。
ステップ 3 コマンド入力後に myfile.log を調べ、システム メッセージ ロギング デーモンが新しい設定変更を読み取ったかどうかを確認します。
1. show logging last number-lines
2. show logging logfile [ start-time yyyy mmm dd hh:mm:ss ] [ end-time yyyy mmm dd hh:mm:ss ]
システム メッセージ ロギングの設定情報を表示するには、次の作業のいずれかを行います。
|
|
---|---|
show logging logfile [ start-time yyyy mmm dd hh:mm:ss ] [ end-time yyyy mmm dd hh:mm:ss ] |
|
これらのコマンド出力のフィールドの詳細については、次の URL にアクセスし、『 Cisco NX-OS System Management Command Reference, Release 4.0 』を参照してください。
http://www.cisco.com/en/US/docs/switches/datacenter/sw/4_0/nx-os/system_management/command/reference/sm_cmd_ref.html
表3-3 に、システム メッセージ ロギング パラメータのデフォルト設定を示します。
|
|
---|---|
イネーブル。重大度については『 Cisco NX-OS System Management Command Reference, Release 4.0 』を参照 |
|
システム メッセージ ロギングの実装に関連する詳細情報については、次の項を参照してください。
• 「関連資料」
• 「規格」
|
|
---|---|
『 Cisco NX-OS System Management Command Reference 』。URL は次のとおり。 http://www.cisco.com/en/US/docs/switches/datacenter/sw/4_0/nx-os/system_management/command/reference/sm_cmd_ref.html |
|
『 Cisco NX-OS System Messages Reference 』。URL は次のとおり。 http://www.cisco.com/en/US/docs/switches/datacenter/sw/system_messages/reference/sl_nxos_book.html |
|
|
---|---|
この機能がサポートする新しい規格または変更された規格はありません。また、この機能で変更された既存規格のサポートはありません。 |