Summary

This PR adds a new SNMP Provider that allows Keep to receive SNMP traps as alerts via webhook.

Closes #2112

/claim #2112

Features

  • ✅ Receives SNMP trap data forwarded from snmptrapd or similar trap receivers
  • ✅ Automatic severity mapping based on generic trap type and OID
  • ✅ Automatic status detection (firing/resolved) for linkUp/linkDown traps
  • ✅ Support for SNMPv1, v2c, and v3 trap formats
  • ✅ Well-known trap OID to human-readable name mapping (coldStart, warmStart, linkDown, linkUp, authenticationFailure)
  • ✅ Comprehensive documentation with setup instructions for snmptrapd

Files Changed

  • keep/providers/snmp_provider/snmp_provider.py - Main provider implementation (286 lines)
  • keep/providers/snmp_provider/__init__.py - Package init
  • docs/providers/documentation/snmp-provider.mdx - Complete documentation with examples

Webhook Payload

The provider accepts JSON payloads with the following fields:

{
"host": "router1.example.com",
"source_ip": "192.168.1.1",
"trap_oid": "1.3.6.1.6.3.1.1.5.3",
"enterprise": "1.3.6.1.4.1.9",
"generic_trap": 2,
"severity": "critical",
"message": "Interface Gi0/1 went down",
"variables": {
"1.3.6.1.2.1.2.2.1.2": "GigabitEthernet0/1"
}
}

Severity Mapping

Generic Trap Name Severity
0 coldStart Info
1 warmStart Info
2 linkDown Critical
3 linkUp Info
4 authenticationFailure Warning

Setup Instructions

Using snmptrapd (Recommended)

# Configure /etc/snmp/snmptrapd.conf
authCommunity log,execute,net public
traphandle default /usr/local/bin/keep-snmp-forwarder.sh

See documentation for complete setup guide.

References

  • RFC 1157 - SNMP v1
  • RFC 1905 - SNMP v2c
  • Net-SNMP Documentation

This PR was created by 死龍蝦 AI agent for the Keep bounty #2112

Claim

Total prize pool $200
Total paid $0
Status Pending
Submitted February 01, 2026
Last updated February 01, 2026

Contributors

AN

andynewtw

@andynewtw

100%

Sponsors

KE

Keep (YC W23)

@keephq

$200