Using WLS SNMP utilities (for verification and troubleshooting).
Steps:
1. Start WLS 10.0.1.
2. Open a windows command prompt (cmd.exe).
3. Then, set environment variables for java by invoking the following:
C:\wlw10\user_projects\domains\base_domain\bin\setDomainEnv.cmd
4. Reference edocs for deprecated utils:
http://e-docs.bea.com/wls/docs100/admin_ref/snmpcli.html (Deprecated)
5. Use snmpgetnext and snmpget to see if the OID is implemented/available or not.
Look up the OID of the mbean/attribute first, eg:
Mbean: executeQueueRuntime
Attribute: ExecuteThreadCurrentIdleCount
OID: .1.3.6.1.4.1.140.625.180.1.25
http://edocs/wls/docs100/snmp/index.html
Note: Make sure you have the snmp agent and monitor targeted to server properly.
Invoke snmpgetnext to find the exact OID, eg:
C:\test>java snmpgetnext 66.92.88.90 .1.3.6.1.4.1.140.625.360.1.60
Response PDU received from /66.92.75.165, community: public
Object ID: .1.3.6.1.4.1.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.121.36.203.188.119.88
STRING: RUNNING
The exposed OID for attribute serverRuntimeState of serverRuntime mbean is .1.3.6.1.4.1.140.625.360.1.60. I use snmpgetnext to find out exact OID.
If I use snmpget on the exact OID, I get:
C:\test>java snmpget 66.92.88.90 .1.3.6.1.4.1.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.121.36.203.188.119.88
Response PDU received from /66.92.75.165, community: public
Object ID: .1.3.6.1.4.1.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.1
21.36.203.188.119.88
STRING: RUNNING
6. I can also use snmpwalk to verify an OID for attribute ExecuteThreadCurrentIdleCount under mbean executeQueueRuntime, is correct:
C:\test>java snmpwalk -c public@examplesServer 66.92.88.90 1.3.6.1.4.1.140.625.180.1.25
Object ID: .1.3.6.1.4.1.140.625.180.1.25.16.101.103.82.137.181.191.243.93.39.42.
219.18.187.126.125.191
INTEGER: 0
7. Use snmptrapd and snmpv1trap to verify the trap destination are configured properly (listen on port, loop continuously), eg:
C:\test>java snmptrapd -p 165
Trap received from: /127.0.0.1, community: public
Agent: /0.0.0.0
TRAP_TYPE: 6
SPECIFIC NUMBER: 75
Time: 17248
VARBINDS:
Object ID: .1.3.6.1.4.1.140.625.100.5
STRING: Wed May 28 00:46:12 EDT 2008
Object ID: .1.3.6.1.4.1.140.625.100.10
STRING: examplesServer
Object ID: .1.3.6.1.4.1.140.625.100.55
STRING: jmx.monitor.gauge.high
Object ID: .1.3.6.1.4.1.140.625.100.60
STRING: 0
Object ID: .1.3.6.1.4.1.140.625.100.65
STRING: 0
Object ID: .1.3.6.1.4.1.140.625.100.70
STRING:
Object ID: .1.3.6.1.4.1.140.625.100.75
STRING: ExecuteQueueRuntime
Object ID: .1.3.6.1.4.1.140.625.100.80
STRING: ExecuteThreadCurrentIdleCount
8. Reference docs for WLS 10.0 utils:
http://edocs.bea.com/wls/docs100/snmpman/snmpcli.html#wp1181263
9. Set up environment, by invoking:
${WL_HOME}\server\bin\setWLSEnv.cmd
For examples:
SnmpGet –
C:\test>java weblogic.diagnostics.snmp.cmdline.Manager SnmpGet .1.3.6.1.4.1.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.121.36.203.188.119.88
enterprises.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.121.36.203.18
8.119.88=RUNNING
SnmpGetAll –
C:\test>java weblogic.diagnostics.snmp.cmdline.Manager SnmpGetAll .1.3.6.1.4.1.140.625.360.1.60
----------------------------------------------
enterprises.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.121.36.203.18
8.119.88=RUNNING
----------------------------------------------
DONE
SnmpGetNext –
C:\test>java weblogic.diagnostics.snmp.cmdline.Manager SnmpGetNext .1.3.6.1.4.1.140.625.360.1.60
enterprises.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.121.36.203.18
8.119.88=RUNNING
SnmpWalk –
C:\test>java weblogic.diagnostics.snmp.cmdline.Manager SnmpWalk .1.3.6.1.4.1.140.625.360.1.60
enterprises.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.121.36.203.18
8.119.88=RUNNING
enterprises.140.625.360.1.60.16.171.5.160.79.30.237.108.44.247.215.121.36.203.18
8.119.88=RUNNING
DONE
SnmpTrapMonitor (run continuously in loop, listing on port) –
C:\test>java weblogic.diagnostics.snmp.cmdline.Manager SnmpTrapMonitor -p 165
Listening on port:165
--- Snmp Trap Received ---
Version : v1
Source : UdpEntity:127.0.0.1:161
Community : public
TrapOID : enterprises.140.625.0.75
RawTrapOID : 1.3.6.1.4.1.140.625.0.75
Trap Objects : {
{ enterprises.140.625.100.5=Wed May 28 00:43:42 EDT 2008 }
{ enterprises.140.625.100.10=examplesServer }
{ enterprises.140.625.100.55=jmx.monitor.gauge.low }
{ enterprises.140.625.100.60=0 }
{ enterprises.140.625.100.65=0 }
{ enterprises.140.625.100.70= }
{ enterprises.140.625.100.75=ExecuteQueueRuntime }
{ enterprises.140.625.100.80=ExecuteThreadCurrentIdleCount }
}
Raw VarBinds : {
{ enterprises.140.625.100.5=Wed May 28 00:43:42 EDT 2008 }
{ enterprises.140.625.100.10=examplesServer }
{ enterprises.140.625.100.55=jmx.monitor.gauge.low }
{ enterprises.140.625.100.60=0 }
{ enterprises.140.625.100.65=0 }
{ enterprises.140.625.100.70= }
{ enterprises.140.625.100.75=ExecuteQueueRuntime }
{ enterprises.140.625.100.80=ExecuteThreadCurrentIdleCount }
}
--- Snmp Trap Received ---
Version : v1
Source : UdpEntity:127.0.0.1:161
Community : public
TrapOID : enterprises.140.625.0.75
RawTrapOID : 1.3.6.1.4.1.140.625.0.75
Trap Objects : {
{ enterprises.140.625.100.5=Wed May 28 00:43:52 EDT 2008 }
{ enterprises.140.625.100.10=examplesServer }
{ enterprises.140.625.100.55=jmx.monitor.gauge.high }
{ enterprises.140.625.100.60=0 }
{ enterprises.140.625.100.65=0 }
{ enterprises.140.625.100.70= }
{ enterprises.140.625.100.75=ExecuteQueueRuntime }
{ enterprises.140.625.100.80=ExecuteThreadCurrentIdleCount }
}
Raw VarBinds : {
{ enterprises.140.625.100.5=Wed May 28 00:43:52 EDT 2008 }
{ enterprises.140.625.100.10=examplesServer }
{ enterprises.140.625.100.55=jmx.monitor.gauge.high }
{ enterprises.140.625.100.60=0 }
{ enterprises.140.625.100.65=0 }
{ enterprises.140.625.100.70= }
{ enterprises.140.625.100.75=ExecuteQueueRuntime }
{ enterprises.140.625.100.80=ExecuteThreadCurrentIdleCount }
}
No comments:
Post a Comment