Monitoring with JMX

The CMS Server can expose attributes from JMX beans over http in JSON format for monitoring purposes.

1 Configuration

1.1 Access Control

By default, accessing the monitoring data is secured and is only possible from localhost.

Node/etc/conf.d/*.conf

$JCONFIG['accesscontrol.jmx.secured'] = true;
$JCONFIG['accesscontrol.jmx.allowedfrom'] = '127.0.0.1, ::1';
Property name Description
accesscontrol.jmx.secured true to secure access, false to disable security
accesscontrol.jmx.allowedfrom list of IP addresses that can access monitoring data

Generally, it is not recommended to disable security for the monitoring data.

1.2 JMX Beans

The exposed JMX beans can be defined in the configuration files (the following list contains the beans, that are exposed by default):

Node/etc/conf.d/*.conf

$JMX["java.lang:type=Memory"] = array("HeapMemoryUsage", "NonHeapMemoryUsage", "ObjectPendingFinalizationCount");
$JMX["java.lang:type=Threading"] = "*";
$JMX["java.lang:type=OperatingSystem"] = "*";
$JMX["com.gentics.contentnode.mbeans:type=Publish,name=PublisherInfo"] = "*";
$JMX["com.gentics.contentnode.mbeans:type=System,name=SessionInfo"] = "*";
$JMX["com.gentics.contentnode.mbeans:type=System,name=TrxInfo"] = "*";
$JMX["Catalina:type=GlobalRequestProcessor,name=\"ajp-nio-8009\""] = "*";
$JMX["Catalina:type=Manager,host=localhost,context=/CNPortletapp"] = "*";
$JMX["org.glassfish.jersey:type=GCMS,subType=Global,executionTimes=AllRequestTimes"] = "*";

The key must be the full name of the JMX bean, the value may be an array of exposed attributes, or "*" to expose all attributes.

2 Accessing JMX beans

The exposed JMX beans can be accessed over an http GET request to http://[hostname]/CNPortletapp/jmx.

The response will contain the monitoring data in JSON format.