華三網絡裝置資訊級别共有8級,從高到底分别為emergencies/alerts/critical/errors/warnings/notifications/infomational/debugging。
資訊級别 | 數值 | 描述 |
---|---|---|
emergencies | 系統不可用資訊 | |
alerts | 1 | 需要立刻做出反應的資訊 |
critical | 2 | 嚴重資訊 |
errors | 3 | 錯誤資訊 |
warnings | 4 | 警告資訊 |
notifications | 5 | 正常出現但是重要的資訊 |
infomational | 6 | 需要記錄的通知資訊 |
debugging | 7 | 調試過程産生的資訊 |
這裡我隻整理幾條交換機上配置日志主機時必須或者經常用到的配置指令。
info-center enable
info-center source default channel loghost debug state off log state off trap state off
info-center source default channel loghost log level informational state on //發送information以上級别的log日志
以上兩條指令,可以配置指定日志子產品并發送指定日志級别,以上例子為所有子產品(default)。
info-center timestamp loghost no-year-date //将日志格式不顯示年
這條指令可選擇日志時間戳的格式。
info-center loghost host-ipv4-address port port-number facility local7
這條指令是設定日志伺服器位址及端口,facility指令可以設定裝置資訊,以便在日志伺服器上進行日志分類。