weblogic monitoring via snmp or custom scripts?

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

User avatar
inetquestion
Cacti User
Posts: 67
Joined: Wed Feb 01, 2006 11:13 am
Location: Charlotte NC

weblogic monitoring via snmp or custom scripts?

Post by inetquestion »

Just checking to see if there are any tutorials or pointers someone may have on integrating cacti with weblogic. Are there any auxiliary scripts needed to do this function, or is it all done via snmp to weblogic?

-Inet
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This depends on your likings and on SNMP/API available for weblogic. If you know how to get data from it via cli, script, SNMP, http, ..., I will help you building the cacti stuff. Simply perform a simple example from command line or the like and post the output.
Reinhard
User avatar
sebbs
Cacti User
Posts: 97
Joined: Mon Jan 22, 2007 9:41 am
Location: Ottawa,Canada

looking for this as well

Post by sebbs »

I am also trying to look for something like this.

We currently have about 8 Weblogic servers. They all have SNMP agents built into the web application server which I am sure can be used with cacti. (If I knew how to do it).

From what I read on another post...Welogic's OIDs do change after ever restart..could be wrong though. Haven't looked into it that much.
If all else fails, rm -rf /
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please tryout my howtos linked in the first link of my signature. Read on a bit until you reach the SNMP stuff. Report your findings for weblogic
Reinhard
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Come on sebb's, you can make it happen! These would be important Templates for everyone.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
sebbs
Cacti User
Posts: 97
Joined: Mon Jan 22, 2007 9:41 am
Location: Ottawa,Canada

Weblogic 8.1 Mibs

Post by sebbs »

After search around a bit, on Weblogic 8.1. I found a MIB reference table. Where I guess from this tree, you would need to figure out what you want to monitor through Cacti.

Under the WLS, leaf. There a couple of things I wouldnt mind reporting on;

Physical Memory of the host computer
.iso.org.dod.internet.private.enterprises.bea.wls.jrockitRuntimeTable.jrockitRuntimeEntry.jrockitRuntimeTotalPhysicalMemory (.*)
.1.3.6.1.4.1.140.625.302.1.37 (.*)

Bytes of Java heap memory that is being used
.iso.org.dod.internet.private.enterprises.bea.wls.jrockitRuntimeTable.jrockitRuntimeEntry.jrockitRuntimeUsedHeap (.*)
.1.3.6.1.4.1.140.625.302.1.39 (.*)

The current size of the JVM heap in bytes
.iso.org.dod.internet.private.enterprises.bea.wls.jvmRuntimeTable.jvmRuntimeEntry.jvmRuntimeHeapSizeCurrent (.*)
.1.3.6.1.4.1.140.625.340.1.30 (.*)

The current amount of free memory in the JVM heap in bytes
.iso.org.dod.internet.private.enterprises.bea.wls.jvmRuntimeTable.jvmRuntimeEntry.jvmRuntimeHeapFreeCurrent (.*)
.1.3.6.1.4.1.140.625.340.1.25 (.*)

the number of Java threads running in the VM
.iso.org.dod.internet.private.enterprises.bea.wls.jrockitRuntimeTable.jrockitRuntimeEntry.jrockitRuntimeTotalNumberOfThreads (.*)
.1.3.6.1.4.1.140.625.302.1.35 (.*)


So now that I have these...Your cacti docs page, should have documentation on how to setup the xml files?
If all else fails, rm -rf /
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Weblogic 8.1 Mibs

Post by gandalf »

sebbs wrote:...
The current size of the JVM heap in bytes
.iso.org.dod.internet.private.enterprises.bea.wls.jvmRuntimeTable.jvmRuntimeEntry.jvmRuntimeHeapSizeCurrent (.*)
.1.3.6.1.4.1.140.625.340.1.30 (.*)
Recently, sb published Java Templates based on 1.5. Find them in the Scripts and templates forums
So now that I have these...Your cacti docs page, should have documentation on how to setup the xml files?
Sure. Find walkthroughs at the first link of my signature
Reinhard
mvam
Cacti User
Posts: 87
Joined: Wed Jun 01, 2005 2:00 pm
Location: Seattle

Post by mvam »

sebbs, see your PM. i can help you out
User avatar
inetquestion
Cacti User
Posts: 67
Joined: Wed Feb 01, 2006 11:13 am
Location: Charlotte NC

Post by inetquestion »

sebbs, any luck?
davidvincent
Posts: 5
Joined: Wed Mar 28, 2007 2:03 pm

Weblogic

Post by davidvincent »

Hi!

I've been monitoring a bunch of Weblogic domains with cacti for two years.
I have graph and xml snmp queries templates for heap usage, execute queue usage and multicast stats.

It's quite nice.
If I want to monitor a new domain, I just have to create a new "device" in cacti, give the right ip port and snmp community and choose which graphs I want...
Since I got the templates right (like 1 year and a half ago) it's been working seamlessly and needs nearly no maintenance. Maybe 1 hour in a month in average...

The tricky part was dealing with the first half part of the oid which is more or less randomly generated by Weblogic when a managed server is created.

Probably time to share now. I'll try to upload those templates soon.

Regards,
David.
tclark
Posts: 28
Joined: Mon Jul 11, 2005 7:10 pm

Post by tclark »

Any luck with the uploads?
davidvincent
Posts: 5
Joined: Wed Mar 28, 2007 2:03 pm

Weblogic templates

Post by davidvincent »

Here they are.
Heap monitoring, execute queue usage and cluster msgs stats for Weblogic 8.

I exported every templates I had using the "follow dependencies" option.
So,the graph templates probably contains every other template needed (data query, host...).

As I said in my previous post, the only valuable info here is the <oid_index_parse> parameter in the xml snmp query file.

Here is how it looks :

<interface>
<name>Weblogic jvm</name>
<description>Queries a domain for jvm runtime data</description>
<oid_index>.1.3.6.1.4.1.140.625.340.1.1</oid_index>
<oid_index_parse>OID/REGEXP:enterprises.140.625.340.1.1.(.*)$</oid_index_parse>

And it means, that I take what's after the enterprises.140.625.340.1.1. as an index. What's after that is +-randomly generated by Weblogic when you create a managed server (this is explained here http://e-docs.bea.com/wls/docs81/snmpma ... ml#1073516 : "To identify a specific instance of an attribute type, the WebLogic SNMP agent generates and appends an additional set of numbers to the OID of an attribute type. For example, the OID that specifies the value of the serverRuntimeState attribute for an active instance of the sample MedRecServer is .1.3.6.1.4.1.140.625.360.1.60.32.102.100.48.98.101.102.100.99.102.52.98.97.48.48.49.102.57.53.51.50.100.102.53.55.97.101.52.56.99.99.97.99

The OID is persistent across instantiations of the object type. ").

This regexp (enterprises.140.625.340.1.1.(.*)) may not work depending the way the snmpwalk subroutine used by php resolves oid names.

For example, if the snmpwalk subroutine does not resolve oid names at all, it will return .1.3.6.1.4.1.140.625.340 instead of enterprises.140.625.340 and the pattern wont match.
The best practice is probably to completly disable "oid name resolution", but I only understood that later on, and dont remember how you would configure php to do that...

You must also know that those oids are quite long, too long for cacti versions before 0.8.6g is think. But there was a patch somewhere to handle those, and I suppose it was merged into the main source tree after 0.8.6h.

I can also tell you that snmpwalk from ucd-snmp fails to walk Weblogic snmp mib when it encounters the "thread dump" oid, as this is also too long for it... You can use Weblogic snmp client for that (http://e-docs.bea.com/wls/docs81/admin_ref/snmpcli.html).

You can browse the Weblogic mib here to find other interesting counters :
http://e-docs.bea.com/wls/docs81/snmp/index.html

Now, dont forget to activate your admin server snmp agent defining a custom tcp port cause 162 is probably already in use... And restart your admin.

When you create a device using my templates, the community name must be community_prefix@domain_name (as explained here : http://e-docs.bea.com/wls/docs81/snmpma ... ml#1072184).
So where community_prefix is the community you set in the snmp properties on your admin server and domain_name is the name of the domain you want to monitor.


Ok, obviously the data templates, as I now remember what they stand for , are not mandatory...

Hope this helps...

Regards,
David.

Another thing... As mentioned by zorel in http://forums.cacti.net/about21757.html you must set the "host down" detection method to ping only. Else cacti will try to detect if the host is up using some oid thats not present in Weblo MIB.
Attachments
cacti_weblogic_templates.zip
(36.7 KiB) Downloaded 1490 times
Last edited by davidvincent on Mon Jul 02, 2007 1:32 pm, edited 1 time in total.
davidvincent
Posts: 5
Joined: Wed Mar 28, 2007 2:03 pm

Weblogic templates

Post by davidvincent »

Indeed, it looks that the host template contains every other templates and is the only one that you need (except the snmp query xmls that you still need to copy in your ressource dir.).
terrypewing
Posts: 4
Joined: Fri Apr 06, 2007 2:02 pm

Monitoring of admin server or managed servers?

Post by terrypewing »

Thanks to everyone in this thread. I have enable SNMP and am getting numbers back from snmpwalk.

The numbers I'm getting are not making sense to me. I believe I'm only seeing numbers for the admin server rather than the 6 managed servers that make up this cluster.

Does anyone know how I can get metrics for each managed server? For instance, I would like to see the number of idle threads per node in the domain.

I apologize if this is something simple I've overlooked. I've gone through the MIB and BEA documentation and didn't find anything.

Thanks,
-Terry
terrypewing
Posts: 4
Joined: Fri Apr 06, 2007 2:02 pm

Post by terrypewing »

I've found the answer to my question.

When querying the snmp agent, use a community string specific for each managed server. For example, in my environment my managed servers are named "server9", "server10", etc.

to get metrics for server9 I use the community string "abc123@server9".
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest