WebLogic Server Command Reference
Constructs an SNMPv1 trap and distributes it to the SNMP manager or trap daemon that is running on the specified host and listening on the specified port number. For more information about the trap daemon, refer to snmptrapd.
As part of invoking this command, you specify the value for fields within the trap packet that you want to send. The values that you specify must resolve to traps that are defined in the WebLogic Server MIB. For information about WebLogic Server traps and the fields that trap packets require, refer to "Format of WebLogic Trap Notifications" in the WebLogic SNMP Management Guide.
java snmpv1trap [-d] [-c
snmpCommunity
] [-pTrapDestinationPort
]
TrapDestinationHost
.1.3.6.1.4.140.625
agent-addr generic-trap specific-trap timestamp
[OID {INTEGER | STRING | GAUGE | TIMETICKS | OPAQUE |
IPADDRESS | COUNTER}value
] ...
Specifies a password (community name) that secures the data in the trap. If you do not specify a value, the command assumes |
|
Specifies the port number on which the SNMP manager or trap daemon is listening. |
|
Specifies the DNS name or IP address of the computer that hosts the SNMP manager or trap daemon. |
|
Specifies the value of the trap's |
|
Specifies the value of the trap's This field is intended to indicate the computer on which the trap was generated. When using the |
|
Specifies the value of the trap's For a list of valid values, refer to "Format of WebLogic Trap Notifications" in the WebLogic SNMP Management Guide. |
|
Specifies the value of the trap's For a list of valid values, refer to "Format of WebLogic Trap Notifications" in the WebLogic SNMP Management Guide. |
|
Specifies the value of the trap's This field is intended to indicate the length of time between the last re-initialization of the SNMP agent and the time at which the trap was issued. When using the |
|
OID {INTEGER | STRING | GAUGE | TIMETICKS | OPAQUE | IPADDRESS | COUNTER} |
(Optional) Specifies the value of the trap's For each name/value pair, specify an OID, a value type, and a value. For example, a log message trap includes a |
The following example generates a log message trap that contains the trapTime
and trapServerName
variable bindings. It broadcasts the trap through port 165. In the example:
6
is the generic trap value that specifies "other WebLogic Server traps."60
is the specific trap value that WebLogic Server uses to identify log message traps.trapTime
variable binding and .1.3.6.1.4.1.140.625.100.10 is the OID for the trapServerName
variable binding.java snmpv1trap -p 165 localhost .1.3.6.1.4.140.625 localhost 6 60 1000
.1.3.6.1.4.1.140.625.100.5 STRING "2:00 pm" .1.3.6.1.4.1.140.625.100.10
STRING localhost
The SNMP manager (or trap daemon) that is listening at port number 165
receives the trap. If the trap daemon is listening on 165
, it returns the following:
Trap received from: /127.0.0.1, community: public
Enterprise: .1.3.6.1.4.140.625
Agent: /127.0.0.1
TRAP_TYPE: 6
SPECIFIC NUMBER: 60
Time: 1000
VARBINDS:
Object ID: .1.3.6.1.4.1.140.625.100.5
STRING: 2:00 pm
Object ID: .1.3.6.1.4.1.140.625.100.10
STRING: localhost