Configuration Examples for Switch Alarms

This document provides practical configuration examples for implementing and managing switch alarms within the network environment.

Configure external alarms

Configure external alarm contacts to monitor physical conditions and generate appropriate alarm levels when sensors detect changes in the environment.

External alarm contacts allow network devices to monitor physical conditions such as door sensors, temperature sensors, or other environmental monitoring equipment. These sensors can trigger alarms at different severity levels when detecting changes.

Switch# configure terminal
Switch(config)# alarm contact 1 description door sensor
Switch(config)# alarm contact 1 severity major
Switch(config)# alarm contact 1 trigger closed
Switch(config)# end
Switch# show env alarm-contact
ALARM CONTACT 1
Status: not asserted
Description: door sensor
Severity: major
Trigger: closed
ALARM CONTACT 2
Status: not asserted
Description: external alarm contact 2
Severity: minor
Trigger: closed

Configure temperature alarms to a relay

This configuration assigns the secondary temperature alarm to the major relay. With a high temperature threshold of 45 degrees Celsius. All alarms and traps associated with temperature alarm are logged to both a syslog server and an SNMP server, thereby ensuring reliable alert management.

The following commands are used to configure temperature alarm associations:

Switch# configure terminal
Switch(config)# alarm facility temperature secondary high 45
Switch(config)# alarm facility temperature secondary relay major
Switch(config)# alarm facility temperature secondary syslog
Switch(config)# alarm facility temperature secondary notifies

This configuration assigns the primary temperature alarm to the major relay. All alarms and traps related to this alarm are sent to a syslog server..


Switch(config)# alarm facility temperature primary syslog
Switch(config)# alarm facility temperature primary relay major

Configure dual power supplies

This reference provides the commands and expected output to enable dual power supply mode and monitor power redundancy status on the switch.

Configuration commands

This example demonstrates how to configure two power supplies:

Switch# enable
Switch# configure terminal
Switch(config)# power-supply dual

Verification commands

These examples show how to display information when two power supplies are absent, resulting in an alarm that is triggered.


Note


The show facility-alarm status command displays information when two power supplies are absent, resulting in a triggered alarm


Switch# show facility-alarm status
Source Severity Description Relay Time
Switch MAJOR 5 Redundant Pwr missing or failed NONE Mar 01
1993 00:23:52
Switch# show env power
POWER SUPPLY A is DC OK
POWER SUPPLY B is DC FAULTY <--
Switch# show hard led
SWITCH: 1
SYSTEM: GREEN
ALARM : ALT_RED_BLACK <--

Configuration example for display alarm settings

This section explains how to display the current alarm settings and configurations. It describes the active alarms and their parameters in the system.

Switch# show alarm settings
Alarm relay mode: Positive
Power Supply
	 Alarm             Enabled
	 Relay
	 Notifies          Disabled
	 Syslog            Enabled
Temperature-Primary
	 Alarm             Enabled
	 Thresholds        MAX: 80C           MIN: 0C
	 Relay             MAJ
	 Notifies          Enabled
	 Syslog            Enabled
Temperature-Secondary
	 Alarm             Disabled
	 Threshold
	 Relay
	 Notifies          Disabled
	 Syslog            Disabled
SD-Card
	 Alarm             Disabled
	 Relay
	 Notifies          Disabled
	 Syslog            Disabled
Input-Alarm 1
	 Alarm             Enabled
         Relay
	 Notifies          Disabled
	 Syslog            Enabled
Input-Alarm 2
	 Alarm             Enabled
	 Relay
 	 Notifies          Disabled
	 Syslog            Enabled
Input-Alarm 3
	 Alarm             Enabled
	 Relay
	 Notifies          Disabled
	 Syslog            Enabled
Input-Alarm 4
	 Alarm             Enabled
	 Relay
	 Notifies          Disabled
	 Syslog            Enabled
PTP
	 Alarm             Disabled
	 Relay
	 Notifies          Disabled
	 Syslog            Disabled
HSR
	 Alarm             Disabled
	 Relay
	 Notifies          Disabled
	 Syslog            Disabled

Monitoring and maintaining alarms status of switches

Use specific commands to retrieve alarm information and manage switch alarms effectively to maintain network health.

Table 1. Commands for displaying global and port alarm status

No.

Command

Purpose

1

show alarm profile [ name ]

Displays all alarm profiles in the system or a specified profile.

2

show alarm settings

Displays all global alarm settings on the switch.

3

show env { alarm-contact | all | power | temperature }

Displays the status of environmental facilities on the switch.

4

show facility-alarm status [ critical | info | major | minor ]

Displays generated alarms on the switch.