Introduction
- The code is designed to work on Nexus Switches Family platforms that support Python Platform 2.7 or greater.
- It uses the
smtplib
module for sending email alerts and Cisco CLI module for interacting with Cisco Nexus switches.
- smtplib- https://docs.python.org/3/library/smtplib.html
Need for the Code
- The code is useful for monitoring parameters like CRF, INPUT ERROR, OUTPUT ERROR, GIANTS, COLLISION, etc., of network interfaces.
- It provides proactive monitoring of physical interface parameters at the Level 1 Physical layer.
How to Use the Code on Nexus Switches
- Upload the file named
monitor-interface.py
to the flash file of the Nexus switch.
- Execute the script within privilege mode using either
python monitor-interface.py
or python3 monitor-interface.py
.
- The script will send email alerts if it detects any changes in the interface parameter values.
Applying Scheduling Configuration on Nexus Switches
Wrapping Up
- The code is ready to be executed on Nexus switches.
- Scheduling configuration is applied to run the code at specific intervals (e.g., every 10 minutes).
- The code will send email alerts if it detects changes in interface parameter values.
This script can be a valuable tool for monitoring network interfaces on Cisco Nexus switches and receiving timely alerts when issues occur.