This PR adds a new SNMP Provider that allows Keep to receive SNMP traps as alerts via webhook.
Closes #2112
/claim #2112
keep/providers/snmp_provider/snmp_provider.py - Main provider implementation (286 lines)keep/providers/snmp_provider/__init__.py - Package initdocs/providers/documentation/snmp-provider.mdx - Complete documentation with examplesThe 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"
}
}
| Generic Trap | Name | Severity |
|---|---|---|
| 0 | coldStart | Info |
| 1 | warmStart | Info |
| 2 | linkDown | Critical |
| 3 | linkUp | Info |
| 4 | authenticationFailure | Warning |
# 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.
This PR was created by 死龍蝦 AI agent for the Keep bounty #2112
andynewtw
@andynewtw
Keep (YC W23)
@keephq