Closes #2112 /claim #2112 image image

📑 Description

This PR adds a new SNMP provider to Keep that enables receiving SNMP traps as alerts. The implementation includes:

  • Full SNMP provider implementation with support for v1, v2c, and v3 protocols
  • SNMP trap receiver that converts traps to Keep alerts
  • Configurable trap port (default: 1162)
  • Proper error handling and logging
  • Automatic severity mapping from trap data
  • Support for both IPv4 and IPv6 trap reception
  • Comprehensive configuration validation
  • Provider scopes:
    • Read (mandatory): For reading SNMP data from agents
    • Write (optional): For setting SNMP values on agents
    • Trap (optional): For receiving SNMP traps

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • All the tests have passed

ℹ Additional Information

Configuration

The SNMP provider supports the following authentication configurations:

  • For v1/v2c:

    • Host
    • Version (v1/v2c)
    • Community string
    • Port (default: 161)
    • Trap port (default: 1162)
  • For v3:

    • Host
    • Version (v3)
    • Username
    • Authentication protocol (MD5/SHA)
    • Authentication key
    • Privacy protocol (DES/AES)
    • Privacy key
    • Security level (noAuthNoPriv/authNoPriv/authPriv)
    • Port (default: 161)
    • Trap port (default: 1162)

Alert Generation

SNMP traps are converted to Keep alerts with:

  • Automatic severity mapping based on trap data
  • Source tracking from agent address
  • Detailed trap information in alert description

Testing

The implementation includes tests for:

  • Configuration validation
  • Error handling scenarios

Breaking Changes

None. This is a new provider that doesn’t affect existing functionality.

Claim

Total prize pool $200
Total paid $0
Status Pending
Submitted April 12, 2025
Last updated April 12, 2025

Contributors

DA

David Anyatonwu

@onyedikachi-david

100%

Sponsors

KE

Keep (YC W23)

@keephq

$200