當裝置包含冗餘電源時,您可以選擇讓裝置在一個電源失效或改變狀態時生成陷阱。路由器和交換機上都有陷阱,它們會通知狀態更改或故障,並指向有關更改性質的更多資訊。本文說明如何使用簡易網路管理通訊協定(SNMP)追蹤其中一個備援電源何時失效或變更狀態。
本文件沒有特定需求。
本檔案中的資訊適用於具有備援電源的思科路由器和交換器。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
如需文件慣例的詳細資訊,請參閱思科技術提示慣例。
對於路由器,請從CISCO-ENVMON-MIB中注意ciscoEnvMonRedundantSupplyNotification陷阱。變數ciscoEnvMonSupplyDescr和ciscoEnvMonSupplyState提供有關更改性質的詳細資訊。您必須配置snmp-server enable traps envmon命令以啟用陷阱。
.1.3.6.1.4.1.9.9.13.3.0.5 ciscoEnvMonRedundantSupplyNotification OBJECT-TYPE -- FROM CISCO-ENVMON-MIB TRAP VARBINDS { ciscoEnvMonSupplyStatusDescr, ciscoEnvMonSupplyState } DESCRIPTION "A ciscoEnvMonRedundantSupplyNotification is sent if the redundant power supply (where extant) fails. Since such a notification is usually generated before the shutdown state is reached, it can convey more data and has a better chance of being sent than does the ciscoEnvMonShutdownNotification." ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) cisco(9) ciscoMgmt(9) ciscoEnvMonMIB(13) ciscoEnvMonMIBNotificationPrefix(3)ciscoEnvMonMIBNotifications(0) 5 } .1.3.6.1.4.1.9.9.13.1.5.1.2 ciscoEnvMonSupplyStatusDescr OBJECT-TYPE -- FROM CISCO-ENVMON-MIB -- TEXTUAL CONVENTION DisplayString SYNTAX OCTET STRING (0..32) DISPLAY-HINT "255a" MAX-ACCESS read-only STATUS Current DESCRIPTION "Textual description of the power supply being instrumented. This description is a short textual label, suitable as a human-sensible identification for the rest of the information in the entry." ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) ciscoMgmt(9) ciscoEnvMonMIB(13) ciscoEnvMonObjects(1) ciscoEnvMonSupplyStatusTable(5) ciscoEnvMonSupplyStatusEntry(1) 2 } .1.3.6.1.4.1.9.9.13.1.5.1.3 ciscoEnvMonSupplyState OBJECT-TYPE -- FROM CISCO-ENVMON-MIB -- TEXTUAL CONVENTION CiscoEnvMonState SYNTAX Integer { normal(1), warning(2), critical(3), shutdown(4), notPresent(5) } MAX-ACCESS read-only STATUS Current DESCRIPTION "The current state of the power supply being instrumented." ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) ciscoMgmt(9) ciscoEnvMonMIB(13) ciscoEnvMonObjects(1) ciscoEnvMonSupplyStatusTable(5) ciscoEnvMonSupplyStatusEntry(1) 3 }
對於交換機,請注意SNMP陷阱chassisAlarmOn。陷阱中包含chassisTempAlarm、chassisMinorAlarm和chassisMajorAlarm變數,這些變數是確定正在進行的特定機箱警報所必需的。所有這些陷阱均來自CISCO-STACK-MIB。
.1.3.6.1.4.1.9.5.0.5 chassisAlarmOn OBJECT-TYPE -- FROM CISCO-STACK-MIB TRAP VARBINDS { chassisTempAlarm, chassisMinorAlarm, chassisMajorAlarm } DESCRIPTION "A chassisAlarmOn trap signifies that the agent entity has detected the chassisTempAlarm, chassisMinorAlarm, or chassisMajorAlarm object in this MIB has transitioned to the on(2) state. The generation of this trap can be controlled by the sysEnableChassisTraps object in this MIB." ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) workgroup(5) ciscoStackNotificationsPrefix(0) 5 } .1.3.6.1.4.1.9.5.1.2.13 chassisTempAlarm OBJECT-TYPE -- FROM CISCO-STACK-MIB SYNTAX Integer { off(1), on(2), critical(3) } MAX-ACCESS read-only STATUS Current DESCRIPTION "The chassis temperature alarm status." ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) workgroup(5) ciscoStackMIB(1) chassisGrp(2) 13 } .1.3.6.1.4.1.9.5.1.2.11 chassisMinorAlarm OBJECT-TYPE -- FROM CISCO-STACK-MIB SYNTAX Integer { off(1), on(2) } MAX-ACCESS read-only STATUS Current DESCRIPTION "The chassis minor alarm status." ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) workgroup(5) ciscoStackMIB(1) chassisGrp(2) 11 } .1.3.6.1.4.1.9.5.1.2.12 chassisMajorAlarm OBJECT-TYPE -- FROM CISCO-STACK-MIB SYNTAX Integer { off(1), on(2) } MAX-ACCESS read-only STATUS Current DESCRIPTION "The chassis major alarm status." ::= { ISO(1) org(3) DOD(6) Internet(1) private(4) enterprises(1) cisco(9) workgroup(5) ciscoStackMIB(1) chassisGrp(2) 12 }