Configuring WebLogic JMX on LoadRunner Controller

Here is a tip shared by my friend Daisy:

The WebLogic SNMP monitor is enable in the Controller as default. If you need to monitor Weblogic JMX, you have 2 options:

  1. Use the SiteScope as a monitoring tool instead of Controller;
  2. Enable the Weblogic JMX monitor into Controller.
    1. To do this you will  have to configure online_resource_graphs.rmd file – located under <LoadRunner DIR>\dat\online_graphs: update the EnableInUi param of the relevant monitor (i.e. for WebLogic (JMX): search for the [WebLogicJMX] section and update its EnableInUi param).
    2. Also, you might need to install java jdk on Controller (I didn’t have chance to test it):

WebLogic Monitor Requirements and Setup

Requirements

  • JDK 1.4 on controller
  • Permissions on WebLogic MBeans.

Setup on Controller

  • After JDK installation Copy weblogic.jar from the lib folder of WebLogic Server to LoadRunner root\classes.
  • Remove jmxri.jar from LoadRunner root \classes.
  • Specify the path in the LoadRunner root folder\dat\monitors\WebLogicMon.ini file. Edit the JVM entry in the [WebLogicMon] section. For example: JVM=”E:\Program Files\JavaSoft\JRE\1.4\bin\javaw.exe
  • Edit the JavaVersion entry in the [WebLogicMon] section.

Set permissions on WebLogic

  • Open the WebLogic console (http://<host:port>/console).
  • In the tree on the left, select Security > Realms > myrealm > Users, and click Configure a new User… in the screen on the right. The Create User: General tab opens.
  • In the Name box, type weblogic.admin.mbean, enter a password, confirm the password, and then click Apply.
  • In the Groups tab, enter the name of any user or group you want to use for monitoring, and then click Apply.

Configuring Sitescope and Weblogic Servers

Here is a very useful tip shared by my friend Odorico:

LoadRunner doesn’t provide native interface to WebLogic 9 and  10 (only to 8.1FP4) and SiteScope just do it using RMI-IIOP.

So before configuring such monitor, is good to get the Dev/Infra team aware of the monitoring request. They need to check and enable RMI IIOP features inside weblogic.

Here are the steps:

On the WebLogic Server:

Before edit any field on Weblogic you need click in “Lock & Edit”. When you finish all configuration settings, it is necessary click in “Active Changes” to put changes in place.

  1. Enable RMI-IIOP protocol:
  2. At Domain’s Security section, check if “Anonymous Admin Lookup” is enabled
  3. For the service/server you’re monitoring, at service’s Settings, Protocols, IIOP, enable IIOP and in advanced configuration, set up IIOPUserName and IIOPPassword to weblogic’s admin credentials
  4. Maybe a restart will be required

On the JMX Client

  1. Make sure you will be running a JAVA VM at version 1.5 or above.
  2. When activating the JMX client (jconsole, for example) add the following parameter:
  3. -J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:60000:500:10

  4. This will change the timeouts for the CORBA protocol (remember we’re getting JMX from a WebLogic, so it goes thru RMI-IIOP)
  5. Example:
  6. H:\>jconsole -J-Dcom.sun.CORBA.transport.ORBTCPReadTimeouts=10:60000:500:10

  7. Use the following URL pattern:
  8. service:jmx:rmi:///jndi/iiop://YOURSERVERADDRESS:PORT/weblogic.management.mbeanservers.runtime

  9. When asked for a Username and Password, give the RMI IIOPUsername/Password given in server configuration.