Skip to content

feat: add SNMP provider#5564

Open
zekebawt wants to merge 1 commit intokeephq:mainfrom
zekebawt:feat/snmp-provider
Open

feat: add SNMP provider#5564
zekebawt wants to merge 1 commit intokeephq:mainfrom
zekebawt:feat/snmp-provider

Conversation

@zekebawt
Copy link

@zekebawt zekebawt commented Feb 4, 2026

This PR implements an SNMP provider to receive SNMP traps as alerts in Keep.

Summary

Webhook-based SNMP provider that ingests SNMP v1/v2c/v3 traps and converts them to Keep alerts.

Features

  • 🌐 Multi-version support: SNMP v1, v2c, and v3
  • 🎯 Smart severity mapping: Automatic severity detection from trap types, OIDs, and varbinds
  • Status detection: Automatic firing/resolved status from trap types (linkUp/linkDown)
  • 📦 Varbind parsing: Full support for SNMP variable bindings
  • 🔧 Standard trap support: coldStart, warmStart, linkDown, linkUp, authenticationFailure, egpNeighborLoss
  • 🧪 Comprehensive tests: 17 test cases covering various SNMP scenarios

Supported Trap Types

  • Standard SNMPv1 traps (coldStart, warmStart, linkDown, linkUp, authenticationFailure, egpNeighborLoss)
  • Enterprise-specific traps
  • Cisco, Juniper, and other vendor traps

Example Webhook Payload

curl -X POST ''https://api.keephq.dev/alerts/event/snmp'\'
-H ''Content-Type: application/json''
-H ''X-API-KEY: your-api-key''
-d ''{
''''version'''': ''''v2c'''',
''''community'''': ''''public'''',
''''enterprise'''': ''''1.3.6.1.4.1.8072.2.3'''',
''''agentAddress'''': ''''192.168.1.100'''',
''''trapType'''': ''''enterpriseSpecific'''',
''''specificTrap'''': 1,
''''uptime'''': ''''123456789'''',
''''varbinds'''': {
''''1.3.6.1.4.1.8072.2.3.2.1'''': ''''Test message''''
}
}''

Test Coverage

  • Basic trap parsing
  • Link up/down trap detection
  • Varbind extraction
  • Severity mapping (explicit fields and OID inference)
  • Status detection
  • Cisco-specific traps
  • SNMPv3 support
  • Alert ID uniqueness
  • Description formatting

Closes #2112

/claim #2112

Implements webhook-based SNMP provider to receive SNMP traps as alerts.

Features:
- Support for SNMP v1, v2c, and v3 traps
- Automatic severity mapping from trap types and varbinds
- Status detection (firing/resolved) from trap OIDs
- Variable bindings (varbinds) extraction and parsing
- Support for standard traps (linkUp, linkDown, coldStart, etc.)
- Comprehensive test coverage (17 test cases)

Closes keephq#2112
@vercel
Copy link

vercel bot commented Feb 4, 2026

@zekebawt is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 4, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 4, 2026

Target branch is not in the allowed branches list.

@dosubot dosubot bot added Feature A new feature Provider Providers related issues labels Feb 4, 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

1 participant