---
title: "set snmptrap"
canonical: "https://docs.infoblox.com/space/nios85/35383175/set%20snmptrap"
format: markdown
---
The `set`` ``snmptrap` command sends SNMP traps to the trap receiver you specify. You can use the optional **v3** command to generate SNMPv3 traps. For information about SNMP, see <span style="color: #0000ff">[*Monitoring with SNMP*](https://infoblox-docs.atlassian.net/wiki/spaces/nios85/pages/35417374)</span>.  
Use the *<span style="color: #0000ff">[show](https://infoblox-docs.atlassian.net/wiki/spaces/nios85/pages/35750173)</span>*[ ](https://infoblox-docs.atlassian.net/wiki/spaces/nios85/pages/35750173)*<span style="color: #0000ff">[snmp](https://infoblox-docs.atlassian.net/wiki/spaces/nios85/pages/35750173)</span>* command to get information about SNMP objects.

> ⚠️ **Note**
> ⚠️ 
> ⚠️ Use t<span style="color: #172b4d">he </span>`set`` ``snmptrap`<span style="color: #172b4d"> command only for test purposes because </span><span style="color: #333333">it uses 0</span><span style="color: #333333"> as the value of the </span>`msgAuthoritativeEngineBoots`<span style="color: #333333"> and </span>`msgAuthoritativeEngineTime`<span style="color: #333333"> variables and this may cause the trap receiver to drop traps.</span>

# Syntax

`set snmptrap variable {``name of an SNMP variable, in dotted or symbolic format``} address {``the address of the trap receiver``} [v3] [``snmpuser``]`

| **Argument** | **Description** |
| --- | --- |
| `name of an SNMP variable`` ` | The name or OID (object ID) of the SNMP object. For example, you can enter sysName.0 or .1.3.6.1.4.1.2021.11.53.0. |
| `address of the trap receiver`` ` | The IPv4 or IPv6 address of the management system that receives SNMP traps. |
| `snmpuser`` ` | The user name of the SNMPv3 user account. This is optional. If you do not provide a user name, the appliance uses the first SNMPv3 user on the list. |

# Examples

## Sending SNMP traps to a specific trap receiver

Enter the following on the appliance:

`Infoblox > ``set snmptrap variable sysName.0 address 10.0.0.11`

The appliance sends the following acknowledgement to the trap receiver:

`2011-02-23 23:02:51 10.0.0.11 [UDP: [10.0.0.11]:35597->[10.0.0.11]]:`  
`DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (42) 0:00:00.42`  
`SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::sysName.0`  
`2011-02-23 23:02:53 10.0.0.11 [UDP: [10.0.0.11]:52367->[10.0.0.11]]:`  
`DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (42) 0:00:00.42`  
`SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-MIB::sysName.0`` `

## Sending SNMP traps using SNMPv3

Enter the following on the appliance:

`Infoblox > ``set snmptrap variable sysName.0 localhost v3 SNMPv3User1`

The appliance sends the following acknowledgement to the trap receiver:

`2011-02-07 01:08:19 localhost [UDP: [127.0.0.1]:41884->[127.0.0.1]]:`  
`DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (42) 0:00:00.42`  
`SNMPv2-MIB::snmpTrapOID.0 = OID: DISMAN-EVENT-MIB::sysName.0`

Enter the following on the appliance:

`Infoblox > ``set snmptrap variable sysName.0 localhost v3 SNMPv3User1`

The appliance sends the following to the trap receiver in the event of a process failure:

`SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.7779.3.1.1.1.1.2.0`  
`SNMPv2-SMI::enterprises.7779.3.1.1.1.2.1.0 = STRING: "192.168.1.2"`  
`SNMPv2-SMI::enterprises.7779.3.1.1.1.2.2.0 = INTEGER: 5`  
`SNMPv2-SMI::enterprises.7779.3.1.1.1.2.5.0 = STRING: "named"`  
`SNMPv2-SMI::enterprises.7779.3.1.1.1.2.4.0 = INTEGER: 20`  
`SNMPv2-SMI::enterprises.7779.3.1.1.1.2.11.0 = STRING: "A named daemon monitoring`  
`failure has occurred."`