This is a comprehensive Operations & Maintenance (O&M) toolkit specifically designed for ALE (Alcatel-Lucent Enterprise) network devices. The toolkit provides automated device inspection, health monitoring, configuration backup, and comprehensive reporting capabilities for network administrators.
The ALE Network O&M Toolkits automate the following operations & maintenance tasks:
- Device Connectivity Testing - Automatically connects to multiple network devices via SSH
- ALE Device Processing - For ALE devices: Runs
show tech-supportcommand and downloads log files - Multi-Vendor Support - For other vendors: Executes vendor-specific command lists from Excel sheets
- Log File Collection - Downloads critical log files from ALE devices via FTP/TFTP:
tech_support_layer3.logtech_support_layer2.logtech_support.log
- Command Output Consolidation - Saves all command outputs for non-ALE devices in unified text files
- Individual Device Packaging - Creates separate ZIP packages for each device
- Comprehensive Reporting - Generates summary packages and detailed email reports
- Email Notifications - Sends automated email reports with all device packages as attachments
- Automated Network O&M: Eliminate manual device inspection and maintenance tasks
- Multi-Vendor Support: Handle ALE devices and other vendors (Cisco, Huawei, H3C, etc.) differently
- Centralized Log Collection: Gather critical system logs from multiple devices
- Individual Device Packaging: Each device gets its own compressed package for easy management
- Vendor-Specific Processing: ALE devices use tech-support workflow, others use command lists
- Comprehensive Reporting: Generate detailed reports with vendor identification
- Operational Efficiency: Reduce hours of manual O&M work to minutes of automated execution
The toolkit interface showing automated O&M process and results
Excel Configuration β Device Connection β Tech-Support Execution β Log Download β Result Compression β Email Report
β β β β β β
template.xlsx SSH to devices show tech-support FTP/TFTP files ZIP creation SMTP delivery
Typical Execution Flow:
- π Read device list from Excel with vendor-specific command sheets
- π Establish SSH connections to all devices
- π Device Type Processing:
- ALE Devices: Execute tech-support β Download log files via FTP/TFTP
- Other Vendors: Execute command list β Save outputs to unified file
- π¦ Create individual ZIP package for each device
- π Generate summary package with all device packages
- π§ Email all packages to administrators with vendor identification
pip install -r requirements.txt1. Open template.xlsx
2. Fill in device information
3. Save the file
1. Edit .env file
2. Set SMTP server and credentials
3. Configure sender/receiver emails
python ale_inspection.pyBefore running the O&M toolkit, you must configure the device list in the Excel file:
- Open Configuration File:
template.xlsx - Configure Device Information: Fill in device details in the "Device Information" worksheet
- Check Command Configuration: Verify the command worksheet for corresponding device types
- Save File: Ensure the configuration is saved
- Device Detection - Identify devices with
alcatel_aostype - Tech-Support Execution - Run
show tech-supportcommand - Log File Download - Download via FTP (primary) or TFTP (fallback):
tech_support_layer3.logtech_support_layer2.logtech_support.log
- Individual Packaging - Create device-specific ZIP package
- Vendor Detection - Identify Cisco, Huawei, H3C, Ruijie, etc.
- Command Execution - Run commands from vendor-specific Excel sheet
- Output Consolidation - Save all command outputs in single text file
- Individual Packaging - Create device-specific ZIP package
- Summary Package - Combine all device packages
- Email Delivery - Send packages with vendor identification
βββ ale_inspection.py # Main O&M program (interactive startup)
βββ connect.py # Device connection module
βββ send_email.py # Email sending module
βββ zip_file.py # File compression module
βββ env_loader.py # Environment variable loader
βββ tftp_downloader.py # TFTP download tool
βββ template.xlsx # Device configuration file
βββ .env # Email configuration file
βββ LOG/ # O&M results directory
Configure device information in template.xlsx:
| No. | Status | Device IP | Protocol | Port | Username | Password | Enable Password | Device Type |
|---|---|---|---|---|---|---|---|---|
| 1 | Enable | 10.10.10.226 | ssh | 22 | admin | switch | alcatel_aos | |
| 2 | Enable | 192.168.1.100 | ssh | 22 | admin | cisco123 | cisco_ios | |
| 3 | Enable | 192.168.1.101 | ssh | 22 | admin | huawei123 | huawei |
Important Notes:
- Use
alcatel_aosfor ALE device type (tech-support workflow) - Use vendor-specific types for other devices (command list workflow):
cisco_ios,cisco_xe,cisco_nxosfor Cisco deviceshuawei,huawei_vrpfor Huawei devicesh3c_comwarefor H3C devicesruijie_osfor Ruijie devices
- Fill
#in Status column to skip the device - Each device type should have corresponding command sheet in Excel
Email parameters are configured in .env file:
- Sender: (configure in .env)
- Receiver: (configure in .env)
- SMTP Server: (configure in .env)
python ale_inspection.pyThe program will automatically:
- Read Excel configuration - Load device list and vendor-specific commands
- Connect to all devices - Establish SSH connections
- Process by device type:
- ALE devices: Execute tech-support β Download logs β Package individually
- Other vendors: Execute command list β Consolidate outputs β Package individually
- Create summary package - Combine all device packages
- Send email notification - Deliver packages with vendor identification
LOG/
βββ 10.10.10.226_2025-07-16_14-30-15/ # ALE Device Directory
β βββ 10.10.10.226_tech_support_layer3.log # Downloaded log files
β βββ 10.10.10.226_tech_support_layer2.log
β βββ 10.10.10.226_tech_support.log
βββ 192.168.1.100_2025-07-16_14-30-15/ # Cisco Device Directory
β βββ 192.168.1.100_cisco_ios_commands_output.txt # Consolidated commands
βββ 192.168.1.101_2025-07-16_14-30-15/ # Huawei Device Directory
β βββ 192.168.1.101_huawei_commands_output.txt # Consolidated commands
βββ 10.10.10.226_2025-07-16_14-30-15.zip # Individual device packages
βββ 192.168.1.100_2025-07-16_14-30-15.zip
βββ 192.168.1.101_2025-07-16_14-30-15.zip
βββ all_devices_2025-07-16_14-30-15.zip # Summary package
- Individual Packaging: Each device gets its own ZIP package for easy management
- Vendor Identification: Email reports clearly identify device vendors (ALE, Cisco, Huawei, etc.)
- FTP Download: If FTP download fails for ALE devices, fallback records are created
- Command Consolidation: Non-ALE devices have all command outputs in single text file
- Email Delivery: Multiple packages sent as attachments with size optimization
- Check device IP and authentication information
- Verify network connectivity
- Check device FTP service is enabled
- Verify FTP port 21 is accessible
- Confirm file permissions and file existence
- Check username/password for FTP access
- Verify tech-support logs are generated in root directory
- Verify device type matches Excel sheet name
- Check command syntax in vendor-specific sheet
- Confirm device supports the configured commands
- Verify user privileges for command execution
- Check email configuration in .env file
- Verify network connection
pip install -r requirements.txt- netmiko>=4.0.0
- paramiko>=2.7.0
- openpyxl>=3.0.0
- pandas>=1.3.0
- δΈζζζ‘£ - Chinese Documentation
- English Documentation - This file
- β Multi-vendor Support: ALE devices (tech-support) + Other vendors (command lists)
- β Excel Configuration: Device management with vendor-specific command sheets
- β Differential Processing: ALE vs non-ALE devices handled differently
- β Individual Packaging: Each device gets its own ZIP package
- β Vendor Identification: Clear vendor labeling in CLI and email reports
- β FTP Primary Download: FTP-first approach for ALE log file downloads
- β Command Consolidation: Single file output for non-ALE device commands
- β Email Optimization: Smart attachment size management
- β Comprehensive Logging: Detailed error handling and progress tracking
- β Console Interface: Command-line interface for automated operations
This project provides Windows executable version that runs without Python installation.
- Visit the project Releases page
- Download the latest Windows packaged file
- Extract and configure
template.xlsxand.envfiles - Double-click
ALEη½η»θΏη»΄ε·₯ε ·ε .exeto run
- β No Installation Required - No Python environment needed
- β Standalone Execution - Contains all necessary libraries
- β Simple Configuration - Only configuration files needed
- β Good Compatibility - Supports Windows 7 and above
This project is licensed under the MIT License.
Usage Recommendations:
- Development: Run
python ale_inspection.pydirectly - Production: Use Windows packaged version from Releases
Ready to automate your network operations! π