How to use the CA SystemEDGE sendtrap.exe to send traps from sysedge.

Document ID : KB000023360
Last Modified Date : 19/02/2018
Show Technical Document Details


How do I use the sendtrap utility to test snmp traps or send custom traps from a host that has CA SystemEDGE installed?




sendtrap -v [snmp version] -h [hostname] -c [community]  [enterprise oid] [trap type] [sub type] [data oid] [oid type] [oid value] [ [data oid] [oid type] [oid value] ]

For example:
sendtrap -v 1 -h somehost -c admin 6 1023 -i 42 -s "str"


Additional Information:

Send trap usage:

usage: sendtrap [-v 1 | 2c | 3]
        [-f from_addr | from_host]
        [-h dest_addr | dest_host]
        [-e src_encoding_code]
        [ [-i] [-r retries] ]
        [-p port]
        [-c community]
        [-u securityName] [-s secLevel] [-n contextName]
        [-a authPassword] [-A MD5 | SHA]
        [-x privPassword] [-X DES | AES | 3DES]
        [-m FIPS_mode]
        [-t timeout] [-d logLevel]
        [enterprise-oid] [trap-type] [subtype] [[data-oid] [oid-type] [oid-value]]

                supported trap versions are:
                        1 for SNMPv1
                        2c for SNMPv2c
                        3 for SNMPv3

                -i - send INFORM_REQUEST, not TRAP, wait for acknowledgement
                -r - number of retries to deliver an inform request
                        until it is acknowledged
                from_addr/from_host default is localhost
                dest_addr/dest_host default is localhost
                port default is 162
                community default is public
                secLevel is 1|2|3 or noAuthNoPriv|AuthNoPriv|AuthPriv
                FIPS mode is 0(non-FIPS), 1(FIPS coexistence) or 2(FIPS only)
                enterprise-oid is top level enterprise OID
                trap-type is generic trap type
                subtype is enterprise-specific trap subtype,
                        specify it only when type = 6
                data-oid is data object identifier
                oid-type is one of the following:
                        -i - integer,
                        -o - octet,
                        -s - string,
                        -d - object identifier
                        -a - IPv4 address only
                        -c - counter
                        -C - counter64
                        -g - gauge
                        -t - time_ticks
                oid-value has to match the OID type
Please Update This Required Field