set snmptrap
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 Monitoring with SNMP.
Use the show snmp command to get information about SNMP objects.
Note
Use the set snmptrap
command only for test purposes because it uses 0 as the value of the msgAuthoritativeEngineBoots
and msgAuthoritativeEngineTime
variables and this may cause the trap receiver to drop traps.
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."