How to configure Javamelody in Artifactory for monitoring

You may use following instruction to install Javamelody on Artifactory.

 

1. Install jar files found in this link to $ARTIFACTORY_NODE_HOME/tomcat/lib/ . For example,

 curl -L -o javamelody-1.59.0.jar -XGET https://github.com/javamelody/javamelody/releases/download/javamelody-core-1.49.0/jrobin-1.5.9.jar

 curl -L -o javamelody-1.59.0.jar https://github.com/javamelody/javamelody/releases/download/javamelody-core-1.59.0/javamelody-1.59.0.jar

  

2. Modify web.xml at $ARTIFACTORY_NODE_HOME/tomcat/webapps/artifactory/WEB-INF/web.xml according to this instruction. For example,

<filter>
    <filter-name>javamelody</filter-name>
    <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
    <async-supported>true</async-supported>
</filter>
<filter-mapping>
    <filter-name>javamelody</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ASYNC</dispatcher>
</filter-mapping>
<listener>
    <listener-class>net.bull.javamelody.SessionListener</listener-class>
</listener>

3. Restart Artifactory node

4. Check the result by accessing http(s)://YOUR_ARTIFACTORY_NODE:PORT/CONTEXT/monitoring (e.g. http://localhost:8081/artifactory/monitoring)

For more information, please visit Javamelody User Guide page.
 

Tips: Artifactory exposes JMX MBeans as documented here. Using this, you may monitor DB related status, such as number of active connections.