title: Monitoring application-specific metrics using JMX and Hyperic
body: <p>My webapp exposes some application-specific metrics (think "orders placed") via JMX, which I'd like to monitor using <a href="http://www.hyperic.com" rel="nofollow noreferrer">Hyperic HQ</a> (open source edition).</p>
  
  <p>According to the <a href="http://support.hyperic.com/display/DOC/HQ+Inventory+and+Access+Model" rel="nofollow noreferrer">Hyperic Inventory Model</a>, my Linux server is called a <em>Platform</em> hosting my Tomcat 6 <em>Server</em>, which in turn hosts <em>Services</em> (e.g. "Servlet Monitor") that finally expose <em>Metrics</em> (e.g. "Error Count per Minute").</p>
  
  <p>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 <a href="http://support.hyperic.com/display/DOC/JMX+Plugin" rel="nofollow noreferrer">Plugin Development docs</a>, that doesn't seem to be possible. </p>
  
  <p>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 just ask the experts..</p>
  
  <p><strong>Please note:</strong> The Hyperic docs I linked to seem to require an account to view. </p>