Implements an SNMP provider that receives SNMP traps via webhook and converts them into Keep alerts.
How it works: An external snmptrapd daemon receives SNMP traps and forwards them as JSON payloads to Keep’s /event/snmp endpoint via a simple shell script or HTTP forwarder.
source_ip + trap_oid ensures duplicate traps are deduplicated| File | Description |
|---|---|
keep/providers/snmp_provider/__init__.py |
Package marker |
keep/providers/snmp_provider/snmp_provider.py |
Provider implementation |
tests/test_snmp_provider.py |
20 unit tests covering all code paths |
docs/providers/documentation/snmp-provider.mdx |
Full documentation with setup guide |
keep-ui/public/icons/snmp-icon.png |
Provider icon |
Network Device → SNMP Trap → snmptrapd → JSON webhook → Keep /event/snmp → AlertDto
TestParseEventRawBody — dict passthrough, JSON bytes, invalid JSON, other typesTestGetTrapName — well-known OIDs, SNMPv1 generic_trap, enterprise-specific, unknownTestGetSeverity — all severity levels, event-provided severity overrideTestGetStatus — linkUp=RESOLVED, linkDown=FIRING, unknown=FIRINGTestBuildFingerprint — deterministic, different inputs = different fingerprintsTestFormatAlert — v2c linkDown, v1 coldStart, linkUp resolved, enterprise traps, varbinds, minimal events/claim #2112
Closes #2112
~K¹
@thebrierfox
Keep (YC W23)
@keephq