Oracle WebLogic use WLDF profile for diagnose

WebLogic Server has a nice built-in feature called the WebLogic Diagnostic Framework. In this tool you can collect your own profile by creating charts, selecting the mbeans and performance counters of your desire.
 
Now it can be difficult and time-consuming, every time you want to collect some performance metrics using WLDF, so there is a profilepackage available which has some pre-configured collecting profiles.
 
The package contains a set of  Jython classes that contains Watch configurations for that profile, which can then be modified or extended to suit your individual needs.
 
First of all, an available profile you can download from Oracle samplecode site from Oracle. Transfer it to your WLS host, unpack it by jar -xvf wldf.jar; a META-INF and src directory will be created.
 
You can create modular profiles to collect data from EJB, JDBC or JMS or create a Total profile to create all. This profile contains the necessary watches and notifications and even a possibility to mail it to your email address.
 
Here is the way to get it to work. I created a profile against a Oracle FMW SOA Suite 11g environment.

- First, an Oracle FMW environment like SOA Suite or Forms 11g, comes with an ‘out of the box’. To target your own profile to a managed server, you will have to untarget the existing FMWD-module. Go to: Home > Summary of Diagnostic Modules > Module-FMWDFW > and untarget the module for the Server Instance you’d like to attach your own profile to.
 

- To enable the profile, make sure you can run WLST from commandline by running the setDomainEnv.sh from the <Domain_Home>/bin.

- Execute:
java weblogic.WLST enableAllProfiles.py user=’weblogic’ pass=’<password>’ url=’t3://<WLSHOST:PORT>’ targets=’AdminServer,soa_test1′ wldfResource=’perfomanceProfile’ harvesterPeriod=30000.
 

 
Watch the profile being created…
 
When you get the message ‘ Activation completed’, go in your Admin Console, Home > Summary of Diagnostic Modules > and click on your newly created  profile.
 

Click on the tab Collected Metrics and there you see all kinds of Metrics ;-) Nice, isn’t it?
 

 
In here, you can adjust your Metrics and watches to your own wishes. Let’s take a look at the StuckThreadWatch.
 
Default from this profile this watch sends a notification if Stuck Thread Count > 0.
 

 
Of course you can take a higher value by editing the Watch rule. The Alarms are set to Automatic Reset to be evaluated automatically, and if you see the Notification tab you can see a Notification is send through JMX( to any connected JMX Client  (could be a monitoring system)) on SNMP or SMTP.
 

 
Create a Mail Notification
In addition, you can create a mail notification to send automatic emails if an event occurs.
The createSMTPNotification.py is being used for this. This is how it can be enabled:

- Execute :
java weblogic.WLST createSMTPNotification.py  user=’weblogic’ pass=’<password>’ url=’t3://<WLSHOST:PORT>’ sessionName=’MailSession’ sessionJNDIName=’mail/notificationEmail’ sessionProps=’ mail.user=michel;mail.host=mail01′ name=’smtpNotif’ recipients=’michel@mail.com’ wldfResource=’perfomanceProfile’

See how the mailsession is created…
 

 
If you look in your AdminConsole, you can see that your session is created.
 
 

Now, also look at you performance Profile Module to see if the email notification is attached:
 

 
This concludes this blog, you now can tweak and utilize you diagnostic module with loads of options.
 
Have fun!

OVER DE AUTEUR

Started in pharmacy, Michel made the change to IT in 1996, on a UNIX TTY terminal based computer and the MUMPS language. These days he is an Oracle Fusion Middleware Architect at Qualogy, as member of the Exalogic Squad team, with focus on technical infrastructure, Serverside solutions, installing, administering, configuring the Oracle Fusion Middleware stack. He started in 2000 as a support analyst for a big bank with BEA Tuxedo 6.5 and WebLogic 6. His experience is from integrations at telco´s. He now works mainly with Oracle WebLogic 11g and 12c, plus releases with practically all Oracle products running on top of it. In 2012 he became an Oracle ACE and wrote 2 books about WebLogic: http://www.packtpub.com/oracle-weblogic-server-11gr2-administration-essentials/book http://www.packtpub.com/oracle-weblogic-server-12c-first-look/book.

1 Reactie op Oracle WebLogic use WLDF profile for diagnose

  1. Mike Cico schreef:

    Nice article. A nice addition to the stuck-threads watch example would be to use a “Diagnostic Image”, or DIMG, notification type. A DIMG is essentially like a core dump of the in-server state. Within the generated image you will find a thread dump at the time of image capture.

    So, using this “notification” type, you can capture a thread dump at the time the condition occurs, or using an AutomaticReset alarm type, capture a series of thread dumps while the condition persists.

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

De volgende HTML tags en attributen zijn toegestaan: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Contact

Hebt u vragen of suggesties?

Mail info@qualogy.com!


De Bruyn Kopsstraat 9

2288EC Rijswijk (ZH)

The Netherlands

+31.(0)70 319 5000

  • Blog

  • Tags

  • @qualogy_news

  • @qresources

  • Reacties

  • Blijf in contact

    +31.(0)70 319 5000