Polling JMX monitor
I'm looking for a tool that can pull data from an RMI JMX connection and use it for generating alerts and storing historical JMX attributes. I've seen many solutions that want to "push" the data via a Java agent to their monitoring servers but I haven't seen many that try to pull data.
Any ideas of some good products out there?
Hi,
The short answer is yes to all your questions.
The longer answer is that you should be careful when using custom types
in your MBeans, because 1) you will need to make them serializable, and
take care of compatibility issues when they evolve, and 2) you will need to
make the jar that contain them available on the manager side.
To overcome this, JMX defines the notion of Open MBeans and OpenTypes, that
is, generic data-types (CompositeData and TabularData) that can be used to
model custom types.
In JDK 6, we're also introducing the notion of MXBean (see the excellent article
on http://java.sun.com/developer/technicalArticles/J2SE/mxbeans/ ).
MXBeans are just like MBeans, except that the MBeanServer will automatically
transform your custom types into OpenTypes (not all custom types can be
automatically converted - but a great many of them).
In JDK 6 build 98 you will find a new advanced JMX example that demonstrate
configuration MXBeans using XML serializable beans as MBean attributes.
Concerning Notifications, the same concerns applies. We usually recommend
not to create any custom subclass of notification, but use one of the standard
base classes instead. A JMX notification has a user data field in which you
could embed an instance of a generic Open Type (CompositeData/TabularData)
if needed.
The new advanced JMX example also show how you can 'reuse' the base
notification classes.
See:
http://blogs.sun.com/jmxetc/entry/looking_for_jmx_overview_examples
for JMX tutorial, examples, etc...
and
http://blogs.sun.com/jmxetc/entry/an_advanced_jmx_example_for
for instruction on the new JDK 6 JMX example.
I hope this will get you started on JMX!
-- daniel
JMX, SNMP, Java, etc
http://blogs.sun.com/jmxetc
Similar Messages
-
About using OSB JMX Monitoring API
hi Experts,
My customer is using OSB11.1.1.7, they are trying to use JMX Monitoring API to get the statistic info, but have the following issues:
1. For the non-soap service, the serviceDomainMbean.getBusinessServiceStatistics method always return error when typeFlag was set with ResourceType.WEBSERVICE_OPERATION.value(), reason is there is no ws operation for this service, customer wants to know how to know if a service has no ws operation ,therefore they can avoid to get ws-operation statistic info for those kind of services.
2. Is there a way to get statistic info for the current aggregation interval? the api seems works with period from last reset.
3. Further more, How to get statistic info for special period, for example, customer want to query statistic info from 05/01 to 05/03, or from 05/03 12:00 to 05/03 13:00
Thanks for the help.
Best regardsDavinder Singh wrote:
Hi ,
I have an application deployed on weblogic server 8.1 . This has some MBeans exposed
for management purposes. This needs to be accessed from another web application
running on another weblogic instance on different machine. For this the managed
application has a Connector server and the management application is trying to
connect it through Connector client.
At the managed application side , i am getting NoSuchMethodError: javax.management.MBeanServer.getClassLoaderRepository()
I am not using weblogic implementation of JMX (MBean Server).
My guess about the error :the weblogic implements JMX version 1.0 and i am using
JMX remoting API (RI from Sun) which requires JMX 1.2
Is there a way i can make weblogic use JMX 1.2 ?I dont think there is a way to do this. But I might be wrong.
>
Thanx,
Davinder -
Limiting JMX Monitor Executor Pool size
Hi all,
does anybody know how to limit (or in general, set) the size of the Scheduler/Executor Pool in JMX for Monitors?
By default it seems that 10 threads are created, named [JMX Monitor Executor Pool [Thread-n]]. They get created when I create the first Monitoring MBean, in my case this was a simple GaugeMonitor.
I don't have a problem with the 10 threads, but its just that our app already has enough threads as it is, plus the granularity period we will use is fairly big (minutes) and we only have a few Monitor beans, so we won't have high load on them.
Any help appreciated.
Cheers, MarkMark,
You can set the system property jmx.x.monitor.maximum.pool.size to control this, either on the command line with e.g. -Djmx.x.monitor.maximum.pool.size=3 or by calling System.setProperty("jmx.x.monitor.maximum.pool.size", "3"). The value of this property is consulted the first time the class javax.management.monitor.Monitor is loaded (typically when you create your first monitor), and not thereafter, so you must be sure to set it beforehand.
This property is non-standard and will not necessarily work with other implementations of the JMX API, but it does work with the implementation that is in the JDK platform, starting with JDK 6. (Before JDK 6, every monitor had its own thread, so if you are seeing a limit of 10 threads then you are using JDK 6.)
From my reading of the code, it does look as if more threads will be created than strictly necessary. For example, if you only have one monitor then you don't need more than one thread, but if the monitor's granularity period is less than 60 seconds you will end up with 60/period threads, up to the maximum (default 10). For example 4 threads if the period is 15 seconds. I think we should probably fix that. (The core pool size should probably be 1 rather than the same as the max pool size.)
Regards,
�amonn McManus -- JMX Spec Lead -- [http://weblogs.java.net/blog/emcmanus] -
The JMX Monitoring APIs for OSB
hi
I know Using the JMX Monitoring APIs can monitor Oracle Service Bus at run time to know how many messages in a particular service have processed successfully and how many have failed. but those are Statistical Information . i want to monitor the details when a particular service is invoked,such as the caller's IP address, the call is successful or not, the error message and error code.
帖子经 David编辑过There are no public API that are present except for monitoring and Deployment.
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/app_apis.htm#CHDHAJGD
The runtime information for OSB artifacts and their instances are not exposed though API.This use-case can be accomplished by using reporting action. http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/reporting_console.htm#CACJFDGF
Getting IP address of cleints invoking proxy on OSB is little tricky, but some transports do support. eg HTTP. Can you describe in brief actual business case so that we can come-up with some solution. Is this monitoring, part of Business logic or Administrator requirement (Technical) etc.
Thanks
Manoj -
Hi,
Can the JMX monitoring capabilities of Coherence be used to monitor the hit-rate of a near cache, i.e. by adding the JMX command line options to the extend client - to determine how effective it is?
ThanksHi dxfelcey,
You can get to the NearCache statistics by querying CacheMBean(s) with key attribute "tier=front". For example, the following query will return you a set of ObjectNames for all MBeans representing NearCache called "test" instances across the cluster:
MBeanServer mbs=MBeanHelper.findMBeanServer();
Set setNames = mbs.queryNames(new ObjectName("type=Cache,name=test,tier=front,*"), null);For more information please see the Registry Javadoc here:
http://download.oracle.com/otn_hosted_doc/coherence/330/com/tangosol/net/management/Registry.html
and the Coherence Wiki page here:
http://wiki.tangosol.com/display/COH33UG/Managing+Coherence+using+JMX
Regards,
Gene -
How can i use JMX monitroing feature?
Server started with:
-Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
I trying to check can i use ServiceDomainMBean:
java -jar c:\pdprogram\java_lib\cmdline.jar - 192.168.154.142:7092 | grep -i "ServiceDomainMbean"
But result is null.
Am i right understand documentation (http://docs.oracle.com/cd/E21764_01/doc.1111/e15867/app_jmx_monitoring.htm) that some MBean's thread (com.bea.wli) must be open for access for working with JMX monitoring?What is in c:\pdprogram\java_lib\cmdline.jar ? And what exactly are you trying to achieve?
-
JMX monitoring front Coherence cache running on IBM WebSphere
I have a question regarding JMX monitoring a Coherence front cache running in a IBM WebSphere v6.1 JVM (1.5).
My setup is that I have three Coherence nodes (back cache) each running 10 JVMs each. Via JMX all these 30 JVMs are setup to be monitored from one of the 30 JVMs which is configured to be the JmxServer for the other 29 instances. The other 29 JVMs set -Dtangosol.coherence.management.remote=true at startup to indicate that their MBean tree will be managed centrally. This works fine but when I try to extend this to also be able to manage the front cache (running on WebSphere on a separate node in the tier above) by adding the same flag (-Dtangosol.coherence.management.remote=true) it does not appear in the MBean tree as the other 30 Coherence cache (Sun) JVMs do.
Are there other things I have to consider to get this working? There are no firewalls in between the nodes so that is not the problem. How much of IBM WebSpheres (non-standard) JMX-functionality is required to get this to work?
/JonasHow is the WebSphere node connected to the cluster? Is it using TCMP? Extend?
Local, Distributed, Replicated, Near, Overflow, External and Optimistic cache statistics appear in the Coherence JMX server. However, near and local caches created on extend nodes do not appear. Therefore the -Dtangosol.coherence.management.remote=true on an Extend client will not register the near or local caches.
Thanks,
Everett -
IDM JMX monitoring - Synchronization MBean
Does anyone know how to additionally expose Waveset data using JMX MBeans? In earlier versions of the product (at least 7.0) I thought it provided insight into the synchronization processes currently running within the system, under:
ObjectName=IDM:type=Cluster,service=Synchronization,component=ActiveSync,resType=”<Resource type>”,name=”<resource name>”
However, looking at the documentation for 8.1.1, for example, I only see the following:
From: http://docs.sun.com/app/docs/doc/820-7976/byajd?l=en&a=view
Data Exposed in JMX
So what kind of data does Waveset expose using JMX MBeans? The following table contains a list of MBeans, describes the data they provide, and explains how to use that data.
List of MBeans:
Cluster
Names of the servers in the Waveset cluster, including which servers Waveset considers active.
Provides a quick status of the cluster from the perspective of one Waveset server.
ObjectRepository
Waveset repository configuration data, including database name and version, JDBC driver version, and connection pooling settings
Shows everything you need to know about how Waveset talks to the repository.
Performance
Contains sub-beans for DataExporter, DataQueue, FormConverter, ObjectChangeNotification, Reconcile, Rule, TaskInstanceCache, ViewMaster, and WorkItemCache execution.
Identifies GUI performance problems and provides visibility into how these subsystems perform. You can enable these beans to capture data that can quickly isolate why a particular page loads slowly on a production server.
Scheduler
Internal processing counters for the Scheduler
Provides detailed visibility into what the Scheduler is doing at any given point in time. Making use of this bean requires an in-depth understanding of how the Scheduler works.
Server
Current status of this Waveset server
Shows server status
<resource name>
Operational statistics for each resource and connector used by Waveset.
Shows the count and maximum, minimum, and average time for each resource operation. Gives visibility into the performance of the resource, the Waveset interface, and the Waveset activity on each resource.
Was the ability to monitor ActiveSync taken out sometime between 7.0 and 8.1.1? Is there a way to incorporate this into JMX again? Anything I am missing?
Any additional info would be great.
Thanks again!How is the WebSphere node connected to the cluster? Is it using TCMP? Extend?
Local, Distributed, Replicated, Near, Overflow, External and Optimistic cache statistics appear in the Coherence JMX server. However, near and local caches created on extend nodes do not appear. Therefore the -Dtangosol.coherence.management.remote=true on an Extend client will not register the near or local caches.
Thanks,
Everett -
Siebel JMX monitoring using JRuby
Hi,
I am trying to use JRuby to monitor the performance of a Siebel adapter using JRuby. Whist I am able to read the mbean data from the server I am unable to successfully submit the command "reset = conn.invoke(name, 'Reset', '', '' )" The error message I receive is
D:\Scripts\JRuby\jmx.rb:17: for method RemoteMBeanServerConnection.invoke expected [class javax.management.ObjectName, class java.lang.String, class [Ljava.lang.Object;, class [Ljava.lang.String;]; got: [javax.management.ObjectName,java.lang.String,java.lang.String,java.lang.String]; error: argument type mismatch (TypeError)
from C:/Program Files/jruby-1.4.0/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:21:in `call'
from C:/Program Files/jruby-1.4.0/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:21:in `each'
from D:\Scripts\JRuby\jmx.rb:15
The complete code is listed below.
#!/usr/bin/env jruby
include Java
include_class 'javax.management.ObjectName'
include_class 'javax.management.remote.JMXConnectorFactory'
include_class 'javax.management.remote.JMXServiceURL'
jmxurl = 'service:jmx:rmi:///jndi/rmi://localhost.au:8687/jmxrmi'
username, password = 'admin', 'sun12345'
svcurl = JMXServiceURL.new(jmxurl)
cred = java.lang.String[2].new
cred[0], cred[1] = username, password
env = {'jmx.remote.credentials' => cred}
conn = JMXConnectorFactory.connect(svcurl, env).getMBeanServerConnection
names = conn.query_names(ObjectName.new( 'IDM:serverName=localhost,resourceAdapterType=CCB Siebel CRM Position,resourceAdapterName=CCB Siebel CRM Position'), nil)
names.each do |name|
puts "OperationCount: #{conn.get_attribute(name, 'Account_Get_OperationCount')} " + "OperationMaxTime: #{conn.get_attribute(name, 'Account_Get_OperationMaxTime')}"
reset = conn.invoke(name, 'Reset', '', '' )
endHi,
Does anyone have any clues.
Thanks -
Writing a jmx monitor for a message driven bean
I've been reading about using jmx to monitor some jms resources I have deployed to my
WL server. This monitor would monitor "some" MBean to watch for some Stuck Threads which
cause a disconnect to the jms queue to which I listen.
The problem is I'm not sure which, I'm not exactly sure which MBean I need to monitor. My
JMS Listener is an MDB which listens to a queue on a remote weblogic server. What happens is
something on the remote end causes a connection reset. About 10 mins later, I get a stack trace
dump and after that happens I'm no longer able to pull messages off my jms queue. I see logged
events where it says I'm successfully reconnected to my queue, but no amount of wishing will
let the MDB pull a message off the queue.
When the monitor detects a Stuck Thread, I'd like to force an application restart/redeployment, whichever
will accomplish a reconnection to the queue to which I'm listening. The other day, I went in through
the console, did a Lock/Edit and simply updated the already deployed application. Monitoring the log
file, I saw the mdb successfully reastablish connection to my remote end.
However, with 600+ MBeans, I'm kinda stuck on where I should start! Since I see the
stack trace in the AdminServer.log file, I'm thinking I should monitor some LoggingMBean.
But, it is JMS related, so there exists some confusion on my part.
If anyone with JMX experience could point me in the right direction, I'd appreciate
it. I'm just learning jmx, so pls be patient.
Thanks,
JohnYou have a couple of options here. You could monitor the WorkManagerRuntimeMBean's StuckThreadCount using a JMX Counter monitor, and trigger the action when that goes above 0.
You could also use WLDF to configure a Log watch to look for the Stuck thread log message, or use a Collected Metrics watch on the WM attribute, and assign it a JMX Notification. You could then write a JMX Notification listener to capture this event and perform the necessary corrective actions. -
Tree from XML (JMX monitoring and management application)
I am trying to create a tree structure from XML. I am setting
the below XML as the dataProvider for the tree.
Now I only want to see the "element" labels in the tree
structure. But I also see the operationList and the operations
under it too. Is there any way I can filter these out from the tree
structure ?
The reason why I have the operations is that I have to
display them on the right hand side, i.e whenever someone clicks on
an element the operations corresponding to that have to be
displayed on the right hand side.
If you see the "flex-admin" application under the livecycle
data services ... my applications is exactly similar to that.
If anyone needs more information, I would be happy to
provide.
<?xml version="1.0" encoding="UTF-8"?>
<centralmbeanserver>
<element label = "FMC-DropCopies-QA" canonicalName =
"CentralMBeanServer:App=FMC-DropCopies-QA" >
<element label = "Cache Manager" canonicalName =
"CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Cache Manager"
>
<element label = "SACFixFilterRulesCache" canonicalName =
"CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Cache Manager,DB
Cache=SACFixFilterRulesCache" >
<operationList>
<operation name = "reloadDBCache" returnType =
"java.lang.String">
</operation>
</operationList>
</element>
<element label = "SACFIXExecBrokerMapCache" canonicalName
= "CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Cache
Manager,DB Cache=SACFIXExecBrokerMapCache" >
<operationList>
<operation name = "reloadDBCache" returnType =
"java.lang.String">
</operation>
</operationList>
</element>
</element>
<element label = "Source Manager" canonicalName =
"CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Source Manager"
>
<operationList>
<operation name = "enableAllMsgSources" returnType =
"void">
</operation>
<operation name = "disableAllMsgSources" returnType =
"void">
</operation>
<operation name = "listMsgSourceNames" returnType =
"java.util.List">
</operation>
<operation name = "reloadSources" returnType = "void">
</operation>
</operationList>
<element label = "CS-SACFIX6-SS" canonicalName =
"CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Source
Manager,Msg Source=CS-SACFIX6-SS" >
<operationList>
<operation name = "enableMsgSource" returnType = "class
java.lang.String">
</operation>
<operation name = "disableMsgSource" returnType = "class
java.lang.String">
</operation>
</operationList>
</element>
<element label = "CS-SACFIX1-SS" canonicalName =
"CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Source
Manager,Msg Source=CS-SACFIX1-SS" >
<operationList>
<operation name = "enableMsgSource" returnType = "class
java.lang.String">
</operation>
<operation name = "disableMsgSource" returnType = "class
java.lang.String">
</operation>
</operationList>
</element>
</element>
</element>
</centralmbeanserver>How is the WebSphere node connected to the cluster? Is it using TCMP? Extend?
Local, Distributed, Replicated, Near, Overflow, External and Optimistic cache statistics appear in the Coherence JMX server. However, near and local caches created on extend nodes do not appear. Therefore the -Dtangosol.coherence.management.remote=true on an Extend client will not register the near or local caches.
Thanks,
Everett -
Hi Guys,
I am requesting for your help again . I am pretty new to this Oracle OSB and especially the scripting world. Could you please help me out on the below
I am trying to make a JMX Connection to the server using the link/blog post below and have the following questions :
http://techrambler99.blogspot.ca/2013/11/oracle-service-bus-using-management.html
1. It suggests that I need to have the JAR file (alsb.jar,com.bea.common.configfwk_1.7.0.0.jar ,com.bea.core.management.jmx_1.4.2.0.jar,sb-kernel-api.jar,sb-kernel-impl.jar, wlfullclient.jar). I have found these JARS on the server. My question would be how do I make a reference to these Jars in my Code .
Should I copy all these Jars onto my desktop and give the location as class . Assuming that I copied all these Jars to c:/test and MyConnection.java as a source file . Should I issue the "javac -classpath c:/test MyConnection.java.
If I should be running on the server how should I make a reference (As each Jar file is in a different Path)
Please do let me know I am struck here
ThanksHow is the WebSphere node connected to the cluster? Is it using TCMP? Extend?
Local, Distributed, Replicated, Near, Overflow, External and Optimistic cache statistics appear in the Coherence JMX server. However, near and local caches created on extend nodes do not appear. Therefore the -Dtangosol.coherence.management.remote=true on an Extend client will not register the near or local caches.
Thanks,
Everett -
JMX Monitoring and Operations on Processors
Hi,
3 questions:
1.) Is there any way I can view the current state of a particular time window (i.e. retrieve a List of events) thru JMX api?
2.) Is it possible to clear the processor/channel contents without having to undeploy the application? (even implicitly by a sending a global heartbeat that will be cascaded to all processors)
3.) Just to confirm, OSGI stop command causes all heap allocated to a particular application to be candidate for GC?
Regards,
JarellHi,
1) No, there is no JMX API for doing this. You could, however, join to these view and output the whole relation (RSTREAM).
2) No, this would be have to modeled in the application, for example, by setting the CQL queries to use an application-timestamped window, and sending heartbeats.
3) Yes, for example, any thread that might have been used by a adapter, would have been let go. However, note that if it is a custom user-provided adapter, it is still the user's responsibility to release resources that might have been acquired in the suspend() callback. -
Enterprise monitoring using JMX
Hello,
So, my company has a lot of J2EE/Tomcat servers running on java 1.6. I'm trying to find a way to monitor them all via JMX from a centralized system, which would be accessible to multiple users (web based, ideally).
Based on my understanding of JMX, it should be possible to extract the data we need from each JVM. I have been using JConsole to do this on an ad-hoc basis when we have problems with a particular JVM and it's great.
But I can't seem to find any good software for doing enterprise-wide monitoring and long-term data collection... can anyone suggest a good package, either free/open-source (ideally) or commercial?
Basically, I want to be able to:
* collect CPU, memory, DB (hibernate), HTTP request stats, etc. via JMX and archive it
* view graphs of the above
* ideally, we could also receive email alerts if certain conditions were met, e.g. memory almost full.
As a side note:
We're already using Zenoss (http://www.zenoss.com) to monitor the OS-level stuff and we really like it, but we need more visibility into each JVM (we have multiple JVMs per physical server). As far as I can tell, Zenoss doesn't support JMX monitoring... but has anyone found a way to make this work? If so, I'd love to hear about it, since this would be ideal for me.You may want to have a look at Glassbox, an open source troubleshooting agent for pinpointing problems in Enterprise Java applications.
http://www.glassbox.com
It offers both JMX and web-based access to the collected data but I'm not sure the web-based console allows you to present the collected data graphically. But still you could write your own JConsole plugins and display the collected
data coming from Glassbox and your own custom MBeans in a graphical way but of course JConsole is Swing-based.
Have a look at the JavaOne 2007 Hands-On Lab 1420 to get more detailed info about using Glassbox/JMX/JConsole together.
http://blogs.sun.com/lmalventosa/entry/j1_07_hol_1420
Regards,
Luis-Miguel Alventosa
Java SE JMX/JConsole development team
Sun Microsystems, Inc.
http://blogs.sun.com/lmalventosa/ -
Recommend Performance monitor for interface
Hi,
I am configuring my network monitoring application to monitor my Cisco Routers and I am looking for recommended (best practice) thresh hold values for following the interface parameters (Ethernet interface):
Bandwidth Utilization (%)
Error rate (%)
Package discarded (%)
Any help, documents or advice would be appreciated
Regards,
ScreechHere is my 2 cents
Don't think there is a one size fits all
Trunks and other connection between network devices
Bandwidth Utilization 60% on full duplex 40% on half
Error rate 0
Package discarded 0
These interface should be absolutely clean, and you beter check Transmit load and Receive Load rather then Utilization
Userports
Bandwidth Utilization 60% on full duplex 40% on half
Error rate 5
Package discarded 5
Server ports
Bandwidth Utilization 60% on full duplex 40% on half
Error rate 1
Package discarded 1
I would say it is pointless to poll and monitor all ports for bandwith utilisation all the time.
Using rmon or something else to set (a couple of) thresholds and monitor that is a much better idea
Not sure about a tool that could used for that however.
Cheers
Michel
Maybe you are looking for
-
Hi there, need some help. I can no longer see my Time Capusle disk (and it's not performing back ups). I've just moved and set my time capsule back up as my wireless router last night. All seemed to be working fine. Came home from work today and coul
-
Possible to use list filters to filter library?
Hi- We have a library of documents, and want to add XLS to how it displays for end users. However, doing so means we can't use column header filtering. so, we tried to use List filters (as ugly as they are), but they will not allow us to connect to
-
How do I authorise computers and iPads to use iTunes related purchases
how do I authorise computers and iPads to use iTunes related purchases
-
Catch Erros or Let them Fail silently ?? What Option to choose ??
I have heard that there will be a Problem with Flash Players when dealing with RunTIme Errors , so do i have any advnatage if i catch the Error inside the catch block , create a Alert class from there and display it to the User?? Over from this optio
-
Foreign Keys b/w two schema
Hi grus is it possible to make a foreign key on a table in schemaA referenced by a table in SchemaB?