Documentation Center

Setting up Ignite caching metrics and statistics for the Content Delivery embedded cache

For the purposes of debugging or closely monitoring your Content Delivery embedded cache on the server, you may want to expose metrics and statistics for the cache.

About this task

The cache configuration of the Content Service contains a property called metricExporterSpi that contains a JMX (Java Management Extension) bean and exposes metrics:
<property name="metricExporterSpi">
  <list>
    <bean class="org.apache.ignite.spi.metric.jmx.JmxMetricExporterSpi" />
  </list>
</property>

To activate these metrics, you must take some configuration steps.

Procedure

  1. Ensure that your Content Service startup or installation script starts with the following properties set (for example, by passing them as command line parameters in the format -DPROPERTY=VALUE, where PROPERTY is the name of the property and VALUE is its value):
    Property nameValue
    com.sun.management.jmxremote(none)
    com.sun.management.jmxremote.authenticatefalse
    com.sun.management.jmxremote.sslfalse
    com.sun.management.jmxremote.portThe number of a port that is currently not in use
    com.sun.management.jmxremote.rmi.portThe same port number as above
    java.rmi.server.hostnamelocalhost
  2. Ensure that both instances of the statisticsEnabled property as found in the cache-conf.xml file of the Content Service resolve to the value true.
  3. If, after making these changes and restarting your Content Service, you find that caching is not working as expected, you must restart your other nodes as well (Content Deployer and (if using) the Ignite server).

What to do next

You can now monitor the status of your cache regions by making a remote connection from a JMX browser such as JConsole to the endpoint, written as HOST:PORT (so without a protocol), where HOST is the name of the host and PORT is the port number.

To check a cache region, drill down to org.apache/IDENTIFIER/"Cache"/"CACHEGROUPNAME"/Attributes/, where IDENTIFIER is a unique hexadecimal identifier, and CACHEGROUPNAME is the name of the specific cache region you want to check. Under Attributes, you can check the CacheSize attribute, which shows you the size of your cache.