Java EE WebLogic Manual Discovery and Universal Discovery Issues in SCOM 2012 R2

This week I was tasked to start monitoring WebLogic applications using our Operations Manager environment.  We have an existing OEM (Oracle Enterprise Manager) system in place that was our primary resource for monitoring Oracle Databases and WebLogic as well.   However, due to the fact that the OEM SCOM Agent only brings in alerts into the console and doesn’t actually create objects that have a heath state.  Since need the health state of our WebLogic instances to show up in our application dashboards we decided to go with OpsLogix Oracle Management pack to monitor our Oracle Databases.  For the WebLogic monitoring we stuck with the free management pack from Microsoft, System Center 2012 R2 Management Pack for Java EE.

I imported the following Microsoft.JEE.Library, Microsoft.JEE.WebLogic.Library, and the Microsoft.JEE.WebLogic10gR3 management packs to get started.  Within a decent amount of time I started seeing various WebLogic Application Servers being discovered and showing the in Servers View.  However, the one that I really needed never showed.  After digging into the different discoveries and not finding anything wrong with them we ended up finding out that the configuration file nodemanager.domains was not configured correctly and was missing any information about WebLogic instances (Domains) running on this server.  I will be honest with you, I am not a middleware guy so I can’t really explain anything WebLogic to you.  The configuration file was a default file that still hand nothing but the samples domains listed.  After getting some advice we found out that the discovery that looked at this file won’t create an instance if it sees anything with a sample domain listed.

So what now? Well, thanks to Bing I found a good blog that helped me get closer to monitoring WebLogic for this specific application on this server.

Thanks to Christopher Crammond’s blog on TechNet we found that we could manually deploy BeanSpy to our JEE application server then run a PowerShell script that would manually add the WebLogic instance into SCOM.

https://blogs.technet.microsoft.com/random_happy_dev_thoughts/2012/05/21/manually-discovering-jee-application-servers-with-scom-2012/

I will go over at a high level what Christopher Crammond posted.

  1. Deploy BeanSpy to your JEE application Server.
  2. Obtain PowerShell scripts.
    1. There is a few ways you can do this.  For me, I followed #2 on his list.  Search the Operations Manager installation folder.  You will find the following three PowerShell scripts:
      JEEAppServerlibrary.ps1
      NewJEEAppServer.ps1
      RemoveJEEAppServer.ps1

      Copy these to a directory on one of your management servers.

  3. Run PowerShell scripts to add or remove application servers.
    1. You can use the help command to print out the correct inputs and prompts.  I pretty much with the basics:.\NewJEEAppServer.ps1 -Target http://myservername.fqdn:7001

      Once you have ran this script you should see a message Processed app server:  Server Name type: WebLogic Version: Server 10

Here is where I ran into issues.  The next discovery should have started and within a few minutes to a few hours.  Depending on your environment, etc.  However, mine didn’t.  Nothing happened.

 

So this brings me to the next step in my journey.  Figuring out why the discovery “Universal configuration for WebLogic 10gR1 Application Server” didn’t find my instance and start deep monitoring.   This time a co-worker sent me a link to a blog called Kovacija’s Blog.  Again, a very helpful blog that helped me head the right direction.

http://kovac.kapuca.si/2014/03/manual-discover-weblogic-12c-application-server-issue/#comment-122

He pointed out that after you run the PowerShell script to discover the instance and it shows up in Universal Application Server views that nothing happened for him as well.  Since he did all the hard work, my part now was a lot easier.   I will also go a little high level and explain what is going on, but please visit his blog to get more details.

So, what happened?  When the discovery runs for the Universal Configuration, it is looking for a parameter for the TargetAppServerVersion of “10.”  The problem is when we ran the PowerShell scripts to manually create the instance the value actually shows as “Server 10.”

Like he did, I ended up having to create a custom discovery and disabling the discovery “Universal configuration for WebLogic 10GR1 application server.   Now, just like Kapuca, I haven’t tested this for a WebLogic instance running on a Linux OS.  This specific issue I had was with a WebLogic instance not configured correctly running on a Windows Server 2008 R2 box.

So the following is what I did to get my issue resolved.  This is an AS IS post so please assume responsibility for using the code I will provide.  First, I will post the original discovery and then I will post an example of my XML that you can use at your discretion.

 

 

 

 

Advertisements
Tagged with: , ,
Posted in Operations Manager 2012 R2, SCOM 2012 R2, System Center 2012 R2

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow Kristopher Jon Turner on WordPress.com
Archives
%d bloggers like this: