feat: add SNMP provider for network device monitoring#6232
feat: add SNMP provider for network device monitoring#6232Ojas2095 wants to merge 2 commits intokeephq:mainfrom
Conversation
Implements a new SNMP provider that enables Keep to query network devices via SNMP GET and WALK operations. Uses pysnmp-lextudio for robust SNMPv1/v2c protocol support. Resolves keephq#2112
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7ec59da. Configure here.
| severity=AlertSeverity.INFO, | ||
| source=["snmp"], | ||
| **event | ||
| ) |
There was a problem hiding this comment.
_format_alert crashes from duplicate keyword arguments
High Severity
_format_alert passes explicit keyword arguments like id, name, status, severity, and source alongside **event. When event contains any of those same keys — which is the anticipated case given the event.get("id", ...) pattern — Python raises a TypeError for duplicate keyword arguments before AlertDto ever processes them. Other providers (e.g., Kibana) avoid this by using event.pop() to remove keys from the dict before **event unpacking.
Reviewed by Cursor Bugbot for commit 7ec59da. Configure here.
- Added explicit SNMP version validation (ValueError for unsupported versions instead of silent fallback) - Fixed _format_alert to exclude known fields before spreading event dict, preventing duplicate keyword TypeError - Improved logging to use lazy string formatting
|
You have used all of your free Bugbot PR reviews. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |


Description
Adds a new SNMP provider that enables Keep to query networking devices via SNMP protocol.
Features
Changes
Resolves [🔌 Provider]: SNMP provider #2112
Note
Medium Risk
Introduces a new provider that performs outbound SNMP network calls and adds a new runtime dependency (
pysnmp-lextudio), which could impact deployments and error-handling behavior at runtime.Overview
Adds a new
SnmpProviderthat integrates withBaseProviderto query SNMP devices via_query()using SNMPgetandwalk, with configurablehost,port,community, andversion(v1/v2c).Updates dependencies to include
pysnmp-lextudioto support the SNMP HLAPI used by the provider.Reviewed by Cursor Bugbot for commit 7ec59da. Bugbot is set up for automated code reviews on this repo. Configure here.