Managing NerveCenter
-
Controlling NerveCenter from the Command Line - trapgen -
trapgen {-v1 | -v2c | -v2cinform | -v3inform} [-p port] [-c community]
[-w [-t timeout] [-r retries] ] destinationAddress
enterprise {agentAddress | trapOID}
{genericTrapNumber | specificTrapNumber} timeStamp
NoPriv|DES NoAuth|MD5|SHA username [variable type value...]
Generates an SNMP-style trap or inform for NerveCenter testing purposes.
-v1
Sends a SNMP v1 trap. This is the default
-v2c
-v2cinform
-v3inform
-p port
Port number to which the trap is being sent. The default is 162.
-c community
The community name for the agent sending the trap. The default is "public".
-w
Use with -v2cinform and -v3inform to wait for a response back from the machine to which the inform is being sent.
-t timeout
The time in hundredths of a second for which Trapgen waits for a response from an inform. The default is 300 (3 seconds).
-r retries
The number of times Trapgen will attempt to re-send an inform if the inform does not respond. The default is 0.
destinationAddress
Destination address for the trap. destinationAddress can be an IP address or a node's name.
enterprise
(v1 only) SNMP enterprise-specific trap number in dot notation (such as 1.3.6.1.4.1.9) that identifies the agent sending the trap. You can specify a null value ("") for enterprise. The null value equates to 1.3.6.1.4.1.78.
agentAddress
(v1 only) Agent sending the trap. destinationAddress can be an IP address or a node's name. You can specify a null value ("") for agentAddress.
trapOID
(v2c, v2cinform, and v3inform only) A unique object identifier for the trap itself.
genericTrapNumber
(v1 only) One of the SNMP generic trap numbers (0-6).
specificTrapNumber
(v1 only) A particular enterprise-specific trap number. If not used, you should specify zero.
timeStamp
Time elapsed between the last (re)initialization of the entity and the generation of the trap in hundredths of seconds. Taken from the MIB-II object, system.sysUpTime
. You can specify a null value ("") for timeStamp. The null value equates to 1.
NoAuth | MD5 | SHA
(v3inform only) The authentication protocol. If you are sending a v3inform, you must supply an authentication protocol.
NoPriv | DES
(v3inform only) The privacy protocol. If you are sending a v3inform, you must supply a privacy protocol.
username
(v3inform only) Name of a user configured on the remote agent. The default is ncuser
.
variable
Name of variable. variable must be a valid OID in dot notation. A string is not acceptable. For example, use 1.3.6.1.2.1.1.1.0
instead of sysDescr.0
.
type
Type for variable. type can be one of the following: integer, octetstring, octetstringhex, octetstringoctal, octetstringascii, objectidentifier, null, ipaddress, counter, gauge, timeticks, opaque, opaquehex, opaqueoctal, or opaqueascii, counter 64 (v2c, v2cinform, and v3inform only), uint32 (v2c, v2cinform, and v3inform only).
value
Value of variable. Enclosing strings with quotes is optional.
Example 1: In the following example, Trapgen sends an generic SNMP v1 authentication failure trap from the NerveCenter Server Blueridge to itself:
trapgen blueridge "" blueridge 4 0 ""
enterprise and timeStamp are nulls ("") and specificTrapNumber is 0 since a trapgen is sending a generic trap.
Example2: In the following example, Trapgen sends to Blueridge a v2c trap identified with a unique OID (1.3.6.1.2.1.1.1), from an agent (1.3.6.1.4.1.9.1.3) using a null timestamp:
trapgen -v2c blueridge 1.3.6.1.4.1.9.1.3 1.3.6.1.2.1.1.1 ""
Example 3: In this example, Trapgen sends to the node 10.52.174.139 a specific trap number (110000) from the node poe. The trap contains two varbinds with a values of type timeticks and octetstring, respectively.
trapgen 10.52.174.139 1.3.6.1.4.1.9.1.3 poe 6 110000 900
1.3.6.1.2.1.1.3 timeticks 9875632 1.3.6.1.2.1.1.1 octetstring "Cisco
trouter"
Example 4: In this example, Trapgen sends an SNMPv3 Inform to a remote NCServer at 10.69.89.51. The remote NCServer is setup with the default SNMPv3 user (ncuser). A null time stamp is used.
trapgen -v3inform -w 10.69.89.51 1.3.6.1.4.1.78 1.3.6.1.4.1.78.3.5 ""
NoPriv NoAuth NCUser
serializedb | NerveCenter Command Line Interface |
29 July 2003 |