The goal - trying to setup Datadog monitoring of a community Mule server that we have. Using configs from the old server weren't working so I had to learn more about Java infrastructure than I intended. It's simple, but it took me several hours of Googling. Basically you do this -- http://java.dzone.com/articles/remote-jmx-monitoring-mule.
But dudeman's code is broken, presumably because dzone autolinks everything in that
xsi:schemaLocation block. I changed the host to
127.0.0.1 and the port to
9000 in this example, but you can make that whatever you want if you are monitoring remotely.
Just in case that link goes away at some point -
- Create a directory, call it MuleJMXApp
- Drop the following code in, call it
<?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:management="http://www.mulesoft.org/schema/mule/management" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd http://www.mulesoft.org/schema/mule/management http://www.mulesoft.org/schema/mule/management/current/mule-management.xsd"> <management:jmx-server> <management:connector-server url="service:jmx:rmi:///jndi/rmi://127.0.0.1:9000/jmxrmi"/> </management:jmx-server> </mule>
Deploy this directory to your Mule's apps/ directory just like any other Mule app.