Logging System Message Logging

REFERENCE

Configuring System Message Logging and Smart Logging

MEMO

  • ログはデフォルトではコンソール表示のみ
  • logging プロセスを有効にすると、バッファ、syslogサーバ、vtyに送られる
System Message
 |
 |-->  コンソール
 |
 |-->  ロギングプロセス
           |
           |-->  バッファ (config)# logging buffered
           |
           |-->  Syslogサーバ
           |
           |-->  端末回線(vty)

  • ロギングの有効化
(config)#logging on
  • debugのログバッファは8192バイトにする
(config)#logging buffered 8192 ?
  <0-7>          Logging severity level
  alerts         Immediate action needed           (severity=1)
  critical       Critical conditions               (severity=2)
  debugging      Debugging messages                (severity=7)
  emergencies    System is unusable                (severity=0)
  errors         Error conditions                  (severity=3)
  informational  Informational messages            (severity=6)
  notifications  Normal but significant conditions (severity=5)
  warnings       Warning conditions                (severity=4)
  <cr>
  • debugメッセージはコンソールのみに表示する
(config)#logging console ?
  <0-7>          Logging severity level
  alerts         Immediate action needed           (severity=1)
  critical       Critical conditions               (severity=2)
  debugging      Debugging messages                (severity=7)
  emergencies    System is unusable                (severity=0)
  errors         Error conditions                  (severity=3)
  filtered       Enable filtered logging
  guaranteed     Guarantee console messages
  informational  Informational messages            (severity=6)
  notifications  Normal but significant conditions (severity=5)
  warnings       Warning conditions                (severity=4)
  xml            Enable logging in XML
  <cr>
  • debugメッセージは1秒に1回までの表示にする
    ※コンソールのみでの指定が可能
(config)#logging rate-limit ?
  <1-10000>  Messages per second
  all        Rate limit all messages, including debug messages
  console    Rate limit only console messages

(config)#logging rate-limit console?
  <1-10000>  Messages per second
  all        Rate limit all messages, including debug messages
  • TELET経由のユーザはインフォメーショナルより上のみを表示させる(指定値&重要度の高いもの)
(config)#logging monitor ?
  <0-7>          Logging severity level
  alerts         Immediate action needed           (severity=1)
  critical       Critical conditions               (severity=2)
  debugging      Debugging messages                (severity=7)
  emergencies    System is unusable                (severity=0)
  errors         Error conditions                  (severity=3)
  filtered       Enable filtered logging
  informational  Informational messages            (severity=6)
  notifications  Normal but significant conditions (severity=5)
  warnings       Warning conditions                (severity=4)
  xml            Enable logging in XML
  <cr>

コメント