Chapter 5. JMX metrics

This chapter describes the Neo4j monitoring metrics, exposed via JMX.

This chapter describes the following:

Neo4j provides different levels of monitoring facilities in order to supply a continuous overview of the system’s health. For a description of the monitoring options, see Neo4j Operations Manual → Monitoring. Many of the metrics are exposed through JMX.

Please note that the available JMX beans and their names have been updated in 4.0. Beans that duplicate metrics or monitoring options, described in Neo4j Operations Manual → Monitoring, have been removed.

5.1. Adjusting remote JMX access to Neo4j

Per default, the Neo4j Enterprise Server edition does not allow remote JMX connections, since the relevant options in the conf/neo4j.conf configuration file are commented out. To enable this feature, you have to remove the # characters from the various com.sun.management.jmxremote options there.

When un-commented, the default values are set up to enable remote JMX connections with certain roles, refer to the conf/jmx.password, conf/jmx.access, and conf/neo4j.conf files for details.

Make sure that conf/jmx.password has the correct file permissions. The owner of the file has to be the user that will run the service, and the permissions should be read only for that user. On Unix systems, this is 0600.

With this setup, you should be able to connect to JMX monitoring of the Neo4j server using <IP-OF-SERVER>:3637, with the username monitor and the password Neo4j.

Note that it is possible that you have to update the permissions and/or ownership of the conf/jmx.password and conf/jmx.access files — refer to the relevant section in conf/neo4j.conf for details.

For maximum security, please adjust at least the password settings in conf/jmx.password for a production installation.

For more details, see: the JMX documention.

5.2. Connecting to a Neo4j instance using JMX and JConsole

First, start your Neo4j instance, for example using:

$NEO4j_HOME/bin/neo4j start

Now, start JConsole with:

$JAVA_HOME/bin/jconsole

Connect to the process running your Neo4j database instance:

Figure 5.1. Connecting JConsole to the Neo4j Java process
Connecting with JConsole

Now, beside the MBeans exposed by the JVM, you will see be default neo4j.metrics section in the MBeans tab. Under that, you will have access to all the monitoring information exposed by Neo4j.

For opening JMX to remote monitoring access, please see Section 5.1, “Adjusting remote JMX access to Neo4j” and the JMX documention.

Figure 5.2. Neo4j MBeans View
Neo4j MBeans view