Skip to content

feat: Add SNMP provider with v1/v2c/v3 polling and trap receiving#6280

Open
vasquezmyguy-collab wants to merge 1 commit intokeephq:mainfrom
vasquezmyguy-collab:feature/snmp-provider
Open

feat: Add SNMP provider with v1/v2c/v3 polling and trap receiving#6280
vasquezmyguy-collab wants to merge 1 commit intokeephq:mainfrom
vasquezmyguy-collab:feature/snmp-provider

Conversation

@vasquezmyguy-collab
Copy link
Copy Markdown

SNMP Provider for Keep

Implements #2112 — SNMP provider with full v1/v2c/v3 support.

Features

  • Polling mode: SNMP GET for configurable OIDs using pysnmp.hlapi.asyncio.getCmd, with asyncio.run() wrapper for sync compatibility with Keep's _query() interface
  • Trap receiver: Background daemon thread with its own asyncio event loop, using pysnmp.entity low-level API + ntfrcv.NotificationReceiver with proper 5-arg callback
  • SNMP v1/v2c/v3: Full auth support via CommunityData and UsmUserData with configurable auth/priv protocols (MD5, SHA, SHA224/256/384/512, DES, 3DES, AES128/192/256)
  • Well-known trap OID mappings: Automatic severity classification for linkDown, coldStart, warmStart, authenticationFailure, egpNeighborLoss, enterpriseSpecific
  • Standard Keep provider interface: validate_config(), validate_scopes(), dispose(), status(), PROVIDER_SCOPES, PROVIDER_CATEGORY, PROVIDER_TAGS
  • Mock alert data: 6 trap scenarios for testing

File structure

keep/providers/snmp_provider/
├── __init__.py          # Empty
├── snmp_provider.py    # Main provider class (~800 lines)
└── alerts_mock.py      # Mock alert data

/claim #2112

Closes #2112

- Supports SNMP v1, v2c, and v3 authentication
- Polling mode: SNMP GET for configurable OIDs via pysnmp hlapi asyncio
- Trap receiver: Background daemon thread with pysnmp entity API
- Configurable auth/priv protocols (MD5, SHA, DES, AES variants)
- Well-known trap OID severity mappings
- Standard Keep provider interface (validate_config, scopes, dispose, status)
- Mock alert data for testing

/claim keephq#2112
Closes keephq#2112
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


vasquezmyguy-collab seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. Feature A new feature Provider Providers related issues labels Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙋 Bounty claim Feature A new feature Provider Providers related issues size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🔌 Provider]: SNMP provider

2 participants