feat: add SNMP provider (trap receiver + OID polling, 112 tests)#6172
Open
chengyixu wants to merge 2 commits intokeephq:mainfrom
Open
feat: add SNMP provider (trap receiver + OID polling, 112 tests)#6172chengyixu wants to merge 2 commits intokeephq:mainfrom
chengyixu wants to merge 2 commits intokeephq:mainfrom
Conversation
When process_topology refreshes provider topology data it deletes all existing TopologyService rows for that provider. If any of those services were associated with a TopologyApplication (via the TopologyServiceApplication join table), the delete violated the foreign-key constraint on topologyserviceapplication.service_id and raised: sqlalchemy.exc.IntegrityError: ForeignKeyViolation on topologyserviceapplication — topologyservice.id still referenced The fix deletes the TopologyServiceApplication join-table rows first, in the same transaction as the dependency and service deletes, using the same filter pattern already used for TopologyServiceDependency. Closes keephq#5439 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a new Keep provider for SNMP, enabling integration with any SNMP-capable infrastructure device (routers, switches, servers, firewalls, UPS, printers). Push mode: built-in UDP trap receiver + snmptrapd webhook forwarding. Pull mode: periodic OID polling with configurable targets and thresholds. Supports SNMPv1, SNMPv2c, SNMPv3 (MD5/SHA auth, DES/AES privacy). OID severity mapping with configurable overrides. Standard trap OID (1.3.6.1.6.3.1.1.5.*) and vendor prefix support. 112 unit tests, Mintlify docs, auto-generated snippet, mint.json entry. Closes keephq#2112 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@chengyixu is attempting to deploy a commit to the KeepHQ Team on Vercel. A member of the Team first needs to authorize it. |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new provider for SNMP (Simple Network Management Protocol), enabling Keep
to monitor any SNMP-capable infrastructure device: routers, switches, servers,
firewalls, UPS, and printers.
Closes #2112
Features
from devices; also accepts trap data forwarded as JSON from
snmptrapdvia webhookthreshold-based alert generation
pysnmp-lextudio(optional, only needed for trap receiver/polling)Files
keep/providers/snmp_provider/snmp_provider.pykeep/providers/snmp_provider/alerts_mock.pykeep/providers/snmp_provider/requirements.txtpysnmp-lextudiotests/providers/snmp_provider/test_snmp_provider.pydocs/providers/documentation/snmp-provider.mdxdocs/snippets/providers/snmp-snippet-autogenerated.mdxdocs/mint.json/claim #2112