Snmp#52
Open
thegranduke wants to merge 4 commits intoTaurine-Technology:snmpfrom
Open
Conversation
- Add comprehensive SNMP communication layer in utilities.py - Implement low-level SNMP GET/WALK operations using pysnmp 7.x Slim API - Add high-level metric collection functions: - get_device_metrics(): collects CPU, memory, uptime (vendor-aware) - get_interface_statistics(): collects per-interface bytes/packets/errors - Implement poll_snmp_device() orchestrator for Django ORM integration - Add vendor-specific OID dictionary (MikroTik, Ubiquiti, extensible) - Wrap async pysnmp API with asyncio.run() for synchronous Celery compatibility Technical details: - Update pysnmp from pysnmp-lextudio 6.3.0 to official pysnmp 7.1.22 - Use pysnmp.hlapi.v1arch.Slim API for SNMPv2c operations - Comprehensive error handling with timeout management - Full type hints and docstrings on all functions - Follows existing device_monitoring patterns for consistency Data flow: SNMPDevice (config) → poll_snmp_device() → SNMP helpers → SNMPMetrics + SNMPInterfaceStats (database) → Device status updated This establishes the foundation for automated SNMP polling and monitoring.
…tation - Add SNMP_TESTING.md: step-by-step testing guide with troubleshooting - Add STEP1_COMPLETE.md: low-level SNMP utilities documentation - Add STEPS_2_AND_3_COMPLETE.md: complete implementation summary with data flow diagrams Documentation covers: - Test script usage and expected outputs - Common issues and solutions (timeouts, connectivity, vendor OIDs) - API usage examples for all SNMP functions - Implementation status and what works/doesn't work yet - Architecture decisions and technical achievements - Next steps for Celery tasks and API endpoints Provides clear guidance for testing, debugging, and extending the SNMP integration.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- snmp_monitoring/tasks.py: poll_single_snmp_device + poll_all_snmp_devices - snmp_monitoring/views.py: SNMPDevice/Metrics/InterfaceStats endpoints + aggregation - snmp_monitoring/serializers.py: serializers (community_string write-only) - snmp_monitoring/urls.py + control_center/urls.py: add router + mount API
- Add Django admin registration for SNMP models - Remove unused imports in tests.py - Add missing newlines at end of files - Fix whitespace issues in migration files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements the foundational SNMP monitoring system for SDN Launch Control, establishing the data collection infrastructure for monitoring network devices via SNMPv2c. This is Phase 1 of a multi-phase implementation that will eventually include automated polling, API endpoints, and UI integration.
Status: ~60% Complete (Core utilities and orchestrator implemented; Celery tasks and API endpoints pending)