Announcement Announcement Module
No announcement yet.
Monitoring application-specific metrics using JMX and AMS Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Monitoring application-specific metrics using JMX and AMS

    My webapp exposes some application-specific metrics (think "orders placed") via JMX, which I'd like to monitor using AMS.

    According to the Inventory Model, my Linux server is called a Platform hosting my Tomcat 6 Server, which in turn hosts Services (e.g. "Servlet Monitor"), who finally exposes Metrics (e.g. "Error Count per Minute").

    I assume I need to develop a custom Hyperic plugin (just an XML file, really) that would point the agent and server at the correct JMX MBeans. Ideally, I would like to see my webapp listed as a Service hosted by the Tomcat 6 Server, but looking at the Plugin Development docs, that doesn't seem to be possible.

    Maybe that's not too bad anyway, because in theory, I might want to switch my app to Jetty. But I figure that's a very common use case, so are there any best practices?

    I couldn't really find any examples of this on the web, so I thought I might ask..

    Thanks, Dan

  • #2
    The easiest way to expose metrics to AMS is by using the Spring JMX annotations in your application, @ManagedResource, @ManagedAttribute, @ManagedOperation, and (new as of Spring 3.0 M4) @ManagedMetric. Please note that you need the latest version of AMS, 2.0.0.SR02, to work with the Spring JMX annotations from Spring 3.

    See for information on how the ModelMBeans exposed by the annotations get automatically imported by AMS (they will show up as services under your Tomcat server). Note that it's not required to use the annotations - they simply make it easier by automatically populating the ModelMBean descriptors with the necessary info.

    You can also write your own AMS plugin if you choose. If you want services to show up under your Tomcat server, you need to modify the Tomcat plugin, which AMS does not provide source code for (this will be available once we move new AMS functionality to open source Hyperic HQ). You can find documentation on writing HQ plugins here:


    • #3

      I am trying to monitor an MDP deployed on dm server, using the @ManagedResource annotation. I am using the trial version of AMS v2.0.0.SR02 that is downloadable from web.

      The problem is that since my MDP is just using teh DMLC, it does not need any manual intervention. When I use the @ManagedResource, I can see my MDP method in the Control Actions in AMS, but AMS does not show any metrics specific to it. I need to invoke my MDP method from teh control action and it just reports an error even though my MDP is perfectly listening to the messages in the queue. Infact it is just an automated process and does not need any manual intervention for monitoring/changing values at runtime, like we need for other simple getter-setter kind of methods in the class. Please advise.


      • #4
        I assume you bought your call center software from a software company. Surely they have a support line. Surely their software provides this information and it's just a matter of configuring it?