title: Use Jolokia to monitor JMX endpoint of webapp on same Tomcat server
body: <p><a href="http://jolokia.org" rel="nofollow">Jolokia</a> is uncharted territory for me, and after having read the documentation, I'm still not sure if it'll work with the scenario I have in mind.</p>
  
  <p><strong>Setup:</strong></p>
  
  <ul>
  <li>Tomcat application server (version ranges from 6.x to 7.x), usually on a Windows platform, occasionally a flavour of Linux.</li>
  <li>Deployed third-party Java web application (SAP BusinessObjects) with JMX monitoring enabled (accessible through RMI).</li>
  </ul>
  
  <p><strong>Possible gotcha's:</strong></p>
  
  <ul>
  <li>The Java web application to be monitored is commercial and closed source, so modifications are not possible. The only thing that can be changed is the JMX port number</li>
  <li>The JMX endpoint is a custom one, thus not the default <code>jmxrmi</code> endpoint.</li>
  <li>The JMX connection requires authentication.</li>
  </ul>
  
  <p><strong>Goal:</strong></p>
  
  <p>What I'd like to do is to deploy the Jolokia WAR file onto the Tomcat server and then configure it so that I can read the MBean attributes from the other web application.</p>
  
  <p>I would code the client myself using Python (version 3) and the <a href="http://docs.python-requests.org/en/latest/" rel="nofollow">Requests</a> HTTP library.</p>
  
  <p>I've been reading through the Jolokia documentation (again, I'm a complete newbie at this point), but can't figure out if this would be possible or not (as I can't seem to find where to enter the JMX/RMI url or the authentication information).</p>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li>Can I use the WAR agent for this setup? </li>
  <li>If not, can you please explain why (so I can understand, not because I don't believe you). Also, is there another agent that's more suited for this scenario?</li>
  <li>If yes, can you point me in the right direction how to configure the Jolokia to the web application to connect to?</li>
  </ol>