SendTrap​Send​Trap

Send an SNMP trap (event)

Constructs and sends an SNMP v1/v2c/v3 trap to a manager (host: port).

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 OID

Object identifier for the trap type

Varbinds

List of additional OID/value pairs

Community (v1/v2c)

Default localhost

Target host

Hostname or IP of the SNMP manager

Default 162

Target port

UDP port of the SNMP manager (default 162)

Default v2c

SNMP Version

One of v1, v2c, v3

Default 1500

Timeout (ms)

Send timeout for internal operations

SNMPv3 security settings

Min length 1

Username

Auth password

Auth protocol

MD5, SHA, SHA224, SHA256, SHA384, SHA512

Privacy password

Privacy protocol

DES, AES128, AES192, AES256

Min length 1

OID

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

Value

String value to send for this OID