By default the tool is disabled, but you can add performance monitoring with a few quick changes.

Enabling Performance Monitoring

To enable performance monitoring, do the following:

  1. Download javamelody-1.52.0.jar
  2. Shut down Cascade CMS.
  3. Place the JAR file into <Cascade CMS Installation Directory>/tomcat/webapps/ROOT/WEB-INF/lib
  4. One directory above that: Cascade CMS Installation Directory>/tomcat/webapps/ROOT/WEB-INF/lib, edit the file named web.xml
  5. Find this line in web.xml:
    <!-- Java performance monitoring -->
    Uncomment everything below this line up until the following line:
    <!-- end Java performance monitoring -->
  6. Add the following JVM parameter to your startup script:
    -Djavamelody.quartz-default-listener-disabled=true

    This would go in cascade.sh (Linux, OS X, *nix) or cascade.bat (Windows) in the JAVA_OPTS  section. This prevents javamelody from starting up a duplicate worker pool that's used to handle background jobs.
  7. Save the file
  8. Start Cascade.

To access the performance monitoring interface, log in to cascade and then navigate to http://<cascade hostname>:<cascade port>/monitoring.

Disk Usage

The performance monitoring tool will store all performance data inside the tomcat "temp" directory (<Cascade CMS Installation Directory>/tomcat/temp/) and requires a relatively small amount of disk space. This data can be deleted when it is no longer needed and will also not accumulate if the performance monitoring tool is disabled.

Disabling Performance Monitoring

To disable performance monitoring, simply comment back out the section of web.xml that was uncommented in the steps above.

Securing Performance Monitoring Tool

Java Melody does not report or store sensitive data; but if it is required that Melody be secured, it is possible to limit access to the tool by IP address. 

This can be achieved by editing the web.xml file mentioned in the Enabling Performance Monitoring section and adding a second init-param to the performance monitoring filter declaration which by default looks like this:

<filter>
    <filter-name>monitoring</filter-name>
    <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
    <init-param>
      <param-name>quartz-default-listener-disabled</param-name>
      <param-value>true</param-value>
    </init-param>
</filter>

The param to add is called "allowed-addr-pattern". Here is an example of what the parameter will look like in your web.xml:

<init-param>
    <param-name>allowed-addr-pattern</param-name>
    <param-value>192\.168\..*</param-value>
</init-param>

If we then add this to the filter declaration, we have:

<filter>
    <filter-name>monitoring</filter-name>
    <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
    <init-param>
      <param-name>quartz-default-listener-disabled</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>allowed-addr-pattern</param-name>
      <param-value>192\.168\..*</param-value>
    </init-param>
</filter>

Note that the server must be restarted whenever changes are made to web.xml in order for them to take effect.

Alternatively, native Tomcat security features can be used to secure the monitoring app.

Did this answer your question?