Refine your search:

0
2

Does Splunk support Weblogic 9.x and 10.x specifically JMX metrics?

asked 14 Jun '10, 21:14

anasir's gravatar image

anasir
1311
accept rate: 0%

edited 30 Jun '10, 22:33

Justin%20Grant's gravatar image

Justin Grant
1.5k6740


4 Answers:

Another path (which I took because it was easier for me) is to use the Weblogic Scripting Tool (WLST) as a scripted input to Splunk. I run a shell script which calls java weblogic.WLST and a script name..

I run the script every 5 minutes into an index, and can do reports on heap free, threads used, data source statistics. If anyone is interested in the view I can provide that as well..

Example Script:

import time

date = time.strftime("%d-%m-%Y %H:%M:%S")

### Connect to managed server
connect ('<adminaccount>','<password>','t3://<servername>:<serverport>')
serverRuntime();

### Get HEAP Stats
cd ('JVMRuntime/<managedservername>')
heapSizeMax = cmo.getHeapSizeMax()
heapFreeCurrent = cmo.getHeapFreeCurrent()
heapFreePercent = cmo.getHeapFreePercent()
TotalNumberOfThreads=cmo.getTotalNumberOfThreads()

### Print the results
print date,',Host=<managedservername>',',HeapSizeMax=',heapSizeMax,',HeapSizeCurrent=',heapFreeCurrent,',TotalNumberOfThreads=',TotalNumberOfThreads

### Get Database Settings.  Will need to customize with your DataSourceNames
cd('../../JDBCServiceRuntime/<managedservername>/JDBCDataSourceRuntimeMBeans/<datasourcename>');
ActiveConnectionsCurrentCount=cmo.getActiveConnectionsCurrentCount()
ActiveConnectionsHighCount=cmo.getActiveConnectionsHighCount()
ConnectionDelayTime=cmo.getConnectionDelayTime()
FailuresToReconnectCount=cmo.getFailuresToReconnectCount()
LeakedConnectionCount=cmo.getLeakedConnectionCount()
WaitingForConnectionCurrentCount=cmo.getWaitingForConnectionCurrentCount()
WaitingForConnectionHighCount=cmo.getWaitingForConnectionHighCount()

###Print the results
print date,',Host=<managedservername>',',datasource=<datasourcename>',',ActiveConnectionsCurrentCount=',ActiveConnectionsCurrentCount
,',ActiveConnectionsHighCount=',ActiveConnectionsHighCount,',ConnectionDelayTime=',ConnectionDelayTime,',FailuresToReconnec
tCount=',FailuresToReconnectCount,',LeakedConnectionCount=',LeakedConnectionCount,',WaitingForConnectionCurrentCount=',Wait
ingForConnectionCurrentCount,',WaitingForConnectionHighCount=',WaitingForConnectionHighCount

### Disconnect
disconnect()
link

answered 23 Sep '10, 12:03

Brian%20Osburn's gravatar image

Brian Osburn
2.8k13
accept rate: 22%

Yes. You can index any kind of IT data in splunk, including simple metrics data like JMX. It's also easy to correlate metrics to text data (e.g. log messages) so you can figure out what else was happening on your server when you got a particular error message or saw a worrisome JMX value.

In order to get WebLogic JMX into Splunk, you'll want to write a scripted input (e.g. a java command-line app, Jython script, etc.) which collects the JMX metrics you want and then prints the data to stdout as name/value-pair text, which Splunk will then index.

You can take a look at how we did this in the Splunk for WebSphere Application Server app, where we wrote a Jython script which we executed inside WebSphere's command-line shell to call JMX to fetch metrics and print them to stdout. Splunk then indexes the data and automatically extracts fields. Look for WebSphereMBeanStats.py (inside the Splunk for WAS app) to see our Jython script.

link

answered 30 Jun '10, 22:32

Justin%20Grant's gravatar image

Justin Grant
1.5k6740
accept rate: 50%

Hello Brian

I am interested in your view and details on how you implemented this using splunk. I was thinking on doing it using another tool (mrtg) but doing it using splunk makes perfect sense.

Cheers!

link

answered 28 Jul '11, 14:28

fernandocgi's gravatar image

fernandocgi
1
accept rate: 0%

Have a look at SPLUNK for JMX

http://splunk-base.splunk.com/apps/25505/splunk-for-jmx

You may need to specify a custom weblogic jar -> wlfullclient.jar

and a jvm system property -> -Djmx.remote.protocol.provider.pkgs=weblogic.management.remote

to be able to connect and view the Weblogic MBeans (as detailed here for using JConsole to connect to Weblogic)

http://blogs.oracle.com/WebLogicServer/entry/managing_weblogic_servers_with

Details of adding that custom jar to SPLUNK for JMX are in the pdf documentation.You simply drop it in the "SPLUNK4JMX/bin/lib/ext" directory

You can add the jvm system property yourself in the poll_jmx.sh or poll_jmx.bat script.

Let me know how you get on !!

link

answered 28 Jul '11, 15:30

Damien%20Dallimore's gravatar image

Damien Dalli...
2.6k17
accept rate: 21%

edited 28 Jul '11, 15:32

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×18
×5
×5
×4
×3

Asked: 14 Jun '10, 21:14

Seen: 2,051 times

Last updated: 28 Jul '11, 15:32

Copyright © 2005-2012 Splunk, Inc. All rights reserved.