SNMP SendTrap

SNMP SendTrap

Certified

Send SNMP trap to manager

Builds and sends an SNMP v1/v2c/v3 trap to the configured host: port. Renders properties with the run context; defaults to localhost: 162, version v2c, community public. v1/v2c use plaintext communities—use v3 to add authentication and privacy.

yaml
type: io.kestra.plugin.snmp.SendTrap

Send SNMP v2c trap on error

yaml
    id: snmp-trap-on-failure
    namespace: monitoring

    tasks:
      - id: risky
        type: io.kestra.plugin.scripts.shell.Commands
        commands:
          - 'exit 1'

    errors:
      - id: send-trap
        type: io.kestra.plugin.snmp.SendTrap
        host: "snmp.manager.local"
        port: 162
        snmpVersion: "v2c"
        community: "public"
        trapOid: "1.3.6.1.4.1.8072.2.3.0.1"
        bindings:
          - oid: "1.3.6.1.2.1.1.3.0"
            value: "12345"
          - oid: "1.3.6.1.4.1.8072.2.3.2.1"
            value: "FAILED"
Properties

Trap or notification OID

OID for the trap/inform type; required

Additional varbinds

List of extra OID/value pairs appended to the PDU

Definitions
oid*Requiredstring
Min length1

OID

OID of the variable binding (e.g. 1.3.6.1.2.1.1.3.0)

value*Requiredstring

Value

String value to send for this OID

Community string (v1/v2c)

Plaintext community for v1/v2c; ignored for v3

Defaultlocalhost

Resolve target host

Hostname or IP of the SNMP manager; defaults to localhost

Reference (ref) of the pluginDefaults to apply to this task.

Default162

Set SNMP manager port

UDP port for traps/informs; defaults to 162

Defaultv2c

Select SNMP version

One of v1, v2c, v3; defaults to v2c

Default1500

Timeout (ms)

Transport timeout per send; defaults to 1500 ms

SNMPv3 security settings

Username and optional auth/privacy protocols required for v3

Definitions
username*Requiredstring
Min length1

Username

SNMPv3 user name; required when using v3

authPasswordstring

Auth password

Password for the chosen auth protocol; optional when auth is disabled

authProtocolstring

Auth protocol

MD5, SHA, SHA224, SHA256, SHA384, SHA512; blank disables authentication. MD5 and SHA (SHA-1) are cryptographically weak and deprecated; prefer SHA256 or higher.

privPasswordstring

Privacy password

Password for the chosen privacy protocol; optional when privacy is disabled

privProtocolstring

Privacy protocol

DES, AES128, AES192, AES256; blank disables encryption. DES is cryptographically weak and deprecated; prefer AES128 or higher.