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/

Similar Messages

  • Best practice to monitor 10gR3 OSB performance using JMX API?

    Hi guys,
    I need some advice on the best practice to monitor 10gR3 OSB performance using JMX API.
    Jus to show I have done my home work, I managed to get the JMX sample code from
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/jmx_monitoring/example.html#wp1109828
    working.
    The following is the list of options I am think about:
    * Set up: I have a cluster of one 1 admin server with 2 managed servers, which managed server runs an instance of OSB
    * What I try to achieve:
    - use JMX API to collect OSB stats data periodically as in sample code above then save data as a record to a
         database table
    Options/ideas:
    1. Simplest approach: Run the modified version of JMX sample on the Admin Server to save stats data to database
    regularly. I can't see problems with this one ...
    2. Use WLI to schedule the Task of collecting stats data regularly. May be overkill if option 1 above is good for production
    3. Deploy a simple web app on Admin Server, say a simple servlet that displays a simple page to start/stop and configure
    data collection interval for the timer
    What approach would you experts recommend?
    BTW, the caveats os using JMX in http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/jmx_monitoring/concepts.html#wp1095673
    says
         Oracle strongly discourages using this API in a concurrent manner with more than one thread or process. This is because a reset performed in
         one thread or process is not visible to another threads or processes. This caveat also applies to resets performed from the Monitoring Dashboard of
         the Oracle Service Bus Console, as such resets are not visible to this API.
    Under what scenario would I be breaking this rule? I am a little worried about its statement
         discourages using this API in a concurrent manner with more than one thread or process
    Thanks in advance,
    Sam

    Hi Manoj,
    Thanks for getting back. I am afraid configuring aggregation interval from Dashboard doesn't solve problem as I need to collect stats data of endpoint URI or in hourly or daily basis, then output to CSV files so line graphs can be drawn for chosen applications.
    Just for those who may be interested. It's not possible to use SQL to query database tables to extract OSB stats for a specified time period, say 9am - 5pm. I raised a support case already and the response I got back is 'No'.
    That means using JMX API will be the way to go :)
    Has anyone actually done this kind of OSB stats report and care to give some pointers?
    I am thinking of using 7 or 1 days as the aggregation interval set in Dashboard of OSB admin console then collects stats data using JMX(as described in previous link) hourly using WebLogic Server JMX Timer Service as described in
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jmxinst/timer.html instead of Java's Timer class.
    Not sure if this is the best practice.
    Thanks,
    Regards,
    Sam

  • Using JMX to database monitoring

    Hello, I'm a software developer, and I want to use JMX to database monitoring.
    I did sth to see in jconsole some data from our database, but Ive got problem to
    refresh it. I mean when jconsole is running and somebody makes changes in DB
    how can I see it on monitor ... ?? Something like dynamic MBeans ??
    second question - is it possible to use MXBean in java 1.5 ??
    thanks for answers
    PS. we are using Java 5 unfortunetelly

    oh I should say that:
    -I'm using jconsole to monitoring jobs i DB;
    -every job has its own MBean;
    -of course if some changes in already defined jobs occure - its no problem;
    Problem is when somebody create/delete jobs ... how can I using refresh button on jconsole get information about new job ?

  • Monitoring WebLogic Using JMX

    Hi, I'm writing an application to monitor WebLogic (busy threads, heap size etc.), using JMX. I wanted to know if there's a way to create a connection and use it each time I want to get the info from the server (in order minimize the monitoring overhead on performance), or should I create a new connection each time?
    Thanks,
    Y.

    Hi,
    Thanks for answering.
    So if I understand correctly, I need to get the MBeanHome once:
    home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    and then to retrieve each time the MBean that I need:
    home.getMBeansByType("JVMRuntime");
    Is that correct?
    Thanks!

  • Starting/stoping java app using JMX ?

    Hello, do any one know, whether we can start / stop java application using JMX ? I know it is monitoring api and can help to find whether app is up or down

    I see the same error when I start domain1. However, I was able to deploy and configure Access Manager 7.1 using the WAR file method, as described in Sun Java System Access Manager 7.1 Postinstallation Guide, page 153. The Guide's instructions are for Sun Java System Application Server Enterprise Edition 8.2, but they seem to work okay with version 9.1. After deploying the WAR file, the Configurator comes up automatically the first time you browse to its URL, typically http://localhost:8080/amserver.

  • Using JMX to get status information about NetWeaver cluster

    Hi everybody,
    We are trying to use JMX to get some status information about NetWeaver cluster.
    For example, using the MBean with the name u201Ccom.sap.default:name=EL1,j2eeType=SAP_J2EEClusteru201D we can obtain the list of all instances running in cluster. Here an instance is a u201CJava instanceu201D in the NetWeaver terminology.
    The method u201CgetInstanceNodeIDsu201D provides us with a list of all nodes of an instance.
    Concretely, calling this method for a cluster running on one machine with two java processes, we get the following list of node Ids: u201C0, 1476420, 1476450, 1476451u201D where the last two correspond to the two java processes.
    What are the first two node Ids from the list?
    How can the last two node Ids be identified as java processes?
    How can we obtain status information about each java process (node id) ?
    Thanks for all ideas,
    Radu

    As there seems to be a lot of interest in this subject, and since I found some form of solution, I thought I'd share it with you.
    In the es-cli interface, there is a thing called browse mode. Activate it by typing browse after logging in.
    Now you can easily browse your network and all of the managed objects. Use getattributes at the end of each branch to see the properties of objects. So far, I've indexed all of the kernel reader module, the health monitor module, the common config reader and the config reader for workgroup servers. If my employer allows, I will post results to http://tille.garrels.be/training/sunmc/ - check later this week.
    Machtelt.

  • How do I configure an enterprise application using Weblogic 10 wlconfig

    Hi All,
    I am converting an installer from WL8 to WL10. We use wlconfig to configure our EAR in wl8 with several wlconfig commands. These don't seem to work though when attempting to use wl10. The following error comes up more often than not and does not seem to be appropriate to what is actually happening.
    Unable to create new bean of type WebAppComponent for pcidomain_new:Name=GenPortal,Type=Application:missing create method
    I have searched the Weblogic Documentation and have found only general information on how to use wlconfig with a simple example that does not touch on application deployment. I have also found an MBean Reference but am unclear as to how to marry the two.
    It would be really great if someone knew where I might find a concrete example of creating an Enterprise application using WL10.
    Here is the current wlconfig task that we use successfully in weblogic 8.
    ${server-mbean} is read in earlier with a wlconfig query command.
              <wlconfig url="t3://${env.COMPUTERNAME}:${weblogic_port}" username="${weblogic_username}" password="${weblogic_password}">
                   <create type="Application" name="GenPortal" property="GenPortalApp">
                        <set attribute="Path" value="${domain_home}/${domain_name}/applications/GenPortal.ear" />
                        <set attribute="StagingMode" value="nostage" />
                        <set attribute="TwoPhase" value="true" />
                        <create type="WebAppComponent" name="GenPortal">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="GenPortalWebApp.war" />
                        </create>
                        <create type="EJBComponent" name="GenPortalEJB">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="GenPortalEJB.jar" />
                        </create>
                        <create type="EJBComponent" name="BidEvaluatorEJB">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="BidEvaluatorEJB.jar" />
                        </create>
                        <create type="EJBComponent" name="BidFormulatorEJB">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="BidFormulatorEJB.jar" />
                        </create>
                        <create type="EJBComponent" name="ConfiguratorEJB">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="ConfiguratorEJB.jar" />
                        </create>
                        <create type="EJBComponent" name="ISOCommunicationEJB">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="ISOCommunicationEJB.jar" />
                        </create>
                        <create type="EJBComponent" name="LMPManagerEJB">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="LMPManagerEJB.jar" />
                        </create>
                        <create type="EJBComponent" name="ScriptCalcEJB">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="ScriptCalcEJB.jar" />
                        </create>
                        <create type="EJBComponent" name="SettlementEJB">
                             <set attribute="Targets" value="${server-mbean}" />
                             <set attribute="URI" value="SettlementEJB.jar" />
                        </create>
                   </create>
                   <create type="StartupClass" name="PCI_Initializer">
                        <set attribute="Targets" value="${server-mbean}" />
                        <set attribute="ClassName" value="com.pci.gtdw.bean.Initialize" />
                        <set attribute="Arguments" value="port=${weblogic_port},user=background,password=${background_user_password},debug=false,loggerLevel=debug" />
                   </create>
                   <set mbean="${domain_name}:Name=${domain_name},Type=JTA" attribute="TimeoutSeconds" value="1200" />
              </wlconfig>
    As I mentioned earlier right now this fails with when trying to create the WebAppComponent as seen in the error message above.
    Thanks for any help you can provide.

    Here's a couple ideas:
    1. Easier, but with non-deterministic response time:   Wire the button up to one of your I/O pins and poll it.  When you detect the button, issue a software call to stop the pulse train.  If the duration of the button press may be short compared to your polling rate, then wire it to a counter source pin and perform edge counting.  When you poll any value > 0, the press has happened.  (Sometimes the value may be >1 if the switch has "bounce").
    2. Trickier, but with deterministic hardware timing:  Configure another counter, call it counter B, for triggered pulse generation.  Wire/configure the button as the trigger.  Make sure that the "high time" of the pulse is long enough to let your software respond, if needed.   Also configure your original continuous pulse train counter to use Ctr B's output as a "pause trigger", specifying to pause when high.   When the button is pressed, counter B will fire a pulse and that pulse will inhibit your original counter's pulse generation.  In short, the pulses will stop until counter B's pulse has completed its full duration.  Your software can monitor for this series of events and stop the original counter task if needed.
    -Kevin P.

  • Using JMX and MBeans

    I've been experimenting with Java instrumentation with MBeans.
    I created a small app to try out some of the JMX features. The app has a class that I would like to monitor with MBeans. So I created to interfaces to function as MBeans and then had the class in my app implement both interfaces.
    I then wrote a class with only a main() method to instantiate my class and call the methods it implemented from my MBean interface. In the main method I provided the code to get an MBeanServer object and then use that to register my class that implemented the MBean interfaces. My intention was to try this out, but before I did I commented out the code needed to register the class with the MBean server. I did this because I assumed the implemented interface methods would be available for monitoring without registering and it made me think if I can monitor the instrumented class like this why would I need the MBean server.
    So what is the purpose of the JMX framework and MBeans if I can instrument any class as described above?
    Is it necessary to register only to be able to monitor from outside the JMV where the instrumented class is running?
    Or are there other advantages\features\reasons for registering with the MBean server?
    Thanks

    "MS" <[email protected]> wrote:
    >
    Hello All,
    I am looking for a java program that can create JDBC connection pool
    and datasource
    using JMX/Mbeans of WLS 7.0.2.
    Can somebody help?
    Thanks in advance.
    rgds
    MS

  • Maximum number of monitors used for remote desktop not working correctly

    My goal is to connect from my home to my work machine but limit the number of monitors used to 2.
    At work, I have a machine running Windows 7 Enterprise SP1 with dual monitors. My home machine is Windows 8.1 Pro and it has 3 monitors (on two video cards).
    I followed the instructions of the MSDN blog post about using multiple monitors for remote desktop but cannot get it to work right.
    Here's what I see when I modify the group policy setting "Limit maximum number of monitors" on the target (work) machine:
    Setting - Result:
    1 - 1
    2 - 1 (???)
    3 - 3
    It looks like I can't limit the number of monitors used to 2, I get either one or all. Am I missing something or is this by design?
    Max

    Hi Max,
    Support for multiple monitors is available when connecting from any Windows 7/8.1 computer, however, there are restrictions when connecting to a computer using multi-monitor mode. When connecting to Windows 7 computers, only computers that are running Windows
    7 Enterprise or Ultimate can be connected to in multi-monitor mode. When connecting to Windows 8.1, only computers that are running Windows 8.1 Professional or Enterprise can be connected to in multi-monitor mode.
    Karen Hu
    TechNet Community Support

  • When should I use JMX

    Hi all
    I am new to JMX and trying to understand the concepts here.
    I read what is JMX (manages/monitors the application)
    Today let say, I have already web based application. I already monitor and manage what I need. So why would I want JMX?
    If using JMX , I can manage and monitor, then why would I need my web based app?
    I appriciate if some one explains me this.
    thanks

    Hi,
    You may be interested in these three articles:
    "What is JMX":
    http://blogs.sun.com/jmxetc/entry/what_is_jmx
    "Easy Is Not Always Simple":
    http://blogs.sun.com/jmxetc/entry/easy_is_not_always_simple
    Also the excellent article by Brian Goetz:
    "Java theory and practice: Instrumenting applications with JMX"
    http://www-128.ibm.com/developerworks/java/library/j-jtp09196/index.html
    I believe they will answer your questions.
    Best regards,
    -- daniel
    JMX, SNMP, Java, etc...
    http://blogs.sun.com/jmxetc

  • Using JMX to get rollback statistics

    Has anyone used MBean monitoring to get WebLogic transaction rollback statistics? Is there any example code for this out there?
    thanks,
    Jake Vogelaar

    Hello Adam,
    Adam Lunger wrote:
    I have registered a notification listener with a JMSDestinationRuntimeMBean, but I don't get any notifications.
    What notifications are sent from the JMSDestinationRuntimeMBean? All kinds of JMX Notifications like AttributeChangeNotifications.
    >
    Specifically I want to receive notifications when the MesssagesCurrentCount changes. Can I use JMX to get these notifications? Any help is appreciated.Yes, you can use JMX to get notifications when this attribute changes.
    Check out
    http://e-docs.bea.com/wls/docs81/jmx/notifications.html#1118345
    Thanks,
    -satya

  • HDTV as external monitor using ethernet connection

    Hello,
    I want to connect my HDTV to my iMac and use it as an external monitor.
    My HDTV is about 25 ft away from my iMac.
    A HDMI cable of that length cost over 200 $.
    So, its not an option to me.
    I just bought a smart rooter but my HDTV Panasonic Viera P50GT30 is not a smart TV.
    It needs a DLNA server and I can't find one.
    Question : Is there a way to use my HDTV as an external monitor using the Ethernet or Wifi connection?
    Thank's,
    Pierre.

    This look's good.
    http://www.startech.com/AV/Extenders/HDMI/HDMI-over-IP-Extender-with-Audio~IPUSB 2HD2
    But its not.
    OS Compatibility                                                                                                                                                                  Windows® XP(32bit)/ Vista(32/64bit)/ 7(32/64bit) Aero themes supported

  • Can you hook up a monitor using hdmi?

    Hi I am using a Cintiqi Display and would like to add another monitor using the other port HDMI is that possible or do I need to do something else. I just wanted another display to watch videos to learn how to do some Adobe products and thought it be easier to watch it on a monitor while I work on the products ...kind of step by step process. 
    thanks for any help  Maggie

    Not all or even many monitors have HDMI ports but it does have one yes it can be connected. You can also use a HDMI to DVI adapter, in fact Apple include such an adapter in the Mac mini box.
    There is one issue you need to consider though, the Mac mini only supports a maximum resolution of 1920x1200 pixels on the HDMI port. If you monitor has a higher resolution then this may not be the best solution.
    Your other alternative is to get a USB Displaylink adapter to allow connecting a monitor via USB.

  • How to read the messages in the JMS Queue using JMX

    Hi,
              I want to read messages in the JMS queue using JMX. I was able to read using QueueBrowser but want to modify priority of the messages using JMX.
              I tried to use JMSDestinationRuntimeMBean but it does not allow us to read messages unless we pass the message Id. Is there any way that I can get all the messages in the queue.
              I am using Weblogic 8.1 SP4
              Can someone please help me in this regard.
              Thanks,
              Kiran.
              Edited by KGudipati at 10/22/2007 1:22 AM

    Hi,
    As far as i know, JMS Object Messages is not supported by XI JMS adapter.
    you need to have the JMS provider to transform the message to bytes messages.
    (Refer to SAP note 856346)

  • Help needed in using JMX APIs

    Hi
    My requirement is to retrieve the JNDI Names of the JMSConnectionFactory and the JMSQueue using the Connection factory or Queue name. In short im trying out a feasibility of reading the JNDI values for queues from weblogic config.xml instead of reading them from a properties file.
    I developed a sample code using JMX APIs that will fetch the JNDI names of all the JMS destinations available for a particluar JMSServer.
    But is there any way to retrieve the JNDI names based on the queue names .. in general i will give queue name as input and i want the queue's JNDI name as output.
    My sample code is :
    import java.util.Iterator;
    import java.util.Set;
    import javax.management.ObjectName;
    import javax.management.QueryExp;
    import javax.management.Attribute;
    import javax.naming.Context;
    import weblogic.jndi.Environment;
    import weblogic.management.MBeanHome;
    import weblogic.management.RemoteMBeanServer;
    import weblogic.management.WebLogicObjectName;
    import weblogic.management.configuration.JMSQueueMBean;
    import weblogic.management.configuration.JMSServerMBean;
    import weblogic.management.configuration.JMSConnectionFactoryMBean;
    import weblogic.management.configuration.JMSDestinationMBean;
    import weblogic.management.runtime.JMSServerRuntimeMBean;
    import weblogic.management.configuration.JMSDestinationMBean;
    public class JMSAddQueue {// The name of the WebLogic domain, please change this to match the //// name of your installation specific domain name                  
    private static String weblogicDomain = "conciergetestdomain";// The name of the WebLogic server, please change this to match the //// name of your installation specific server name
    public static void main(String[] args) {
         try
              Environment env = new Environment(); 
              env.setProviderUrl("t3://localhost:7001");  
              env.setSecurityPrincipal("system");  
              env.setSecurityCredentials("weblogic");  
              Context ctx = env.getInitialContext();  
              MBeanHome home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);  
              ctx.close();  
      JMSServerMBean cf = (JMSServerMBean)home.findOrCreateAdminMBean("TESTSERVER","JMSServer", weblogicDomain);
    JMSDestinationMBean[] jdb = cf.getDestinations();
    System.out.println("** The JNDI name is : "+jdb[0].getJNDIName());
    catch (Exception e) {
    e.printStackTrace();
    }Is there any way to retrieve the JNDI names using the queue names ?
    Thanks
    Arun B

    I will send up an alert for you, Colin. Even though I use iTunes for Mac, troubleshooting it isn't my forté.

Maybe you are looking for