Per default, the Advanced and Enterprise Neo4j Server editions do not allow remove JMX connections, since the relevant options in the conf/neo4j-wrapper.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 commented in, the default values are set up to allow remote JMX connections with certain roles, refer to the conf/jmx.password
, conf/jmx.access
and conf/wrapper.conf
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.
On Windows, follow this tutorial to set the correct permissions. If you are running the service under the Local System Account, the user that owns the file and has access to it should be SYSTEM.
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/wrapper.conf
for details
Warning | |
---|---|
For maximum security, please adjust at least the password settings in |
For more details, see: http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html
First, start your embedded database or the Neo4j Server, for instance using
$NEO4j_SERVER_HOME/bin/neo4j start
Now, start JConsole with
$JAVA_HOME/bin/jconsole
Connect to the process running your Neo4j database instance:
Now, beside the MBeans exposed by the JVM, you will see an org.neo4j
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 refer to the JMX documention
and pass the com.sun.management.jmxremote.port=portNum
or other configuration as JVM parameters to your running Java process.
In order to programmatically connect to the Neo4j JMX server, there are some convenience methods in the Neo4j Management component to help you find out the most commonly used monitoring attributes of Neo4j. For instance, the number of node IDs in use can be obtained with code like:
Neo4jManager manager = new Neo4jManager( graphDb.getManagementBean( Kernel.class ) ); long nodeIDsInUse = manager.getPrimitivesBean.getNumberOfNodeIdsInUse();
Once you have access to this information, you can use it to for instance expose the values to SNMP or other monitoring systems.
MBeans exposed by the Neo4j Kernel
Name | Description |
---|---|
| The status of Neo4j memory mapping |
| Information about the Neo4j lock status |
| Information about the Neo4j transaction manager |
| Information about the caching in Neo4j |
| The configuration parameters used to configure Neo4j |
| Estimates of the numbers of different kinds of Neo4j primitives |
| Information about the XA transaction manager |
| Information about the sizes of the different parts of the Neo4j graph store |
| Information about the Neo4j kernel |
| Information an High Availability cluster, if enabled. |
MBean Memory Mapping
Attribute | Description | Type |
---|---|---|
| Get information about each pool of memory mapped regions from store files with memory mapping enabled | String |
MBean Locking
Attribute | Description | Type |
---|---|---|
| The number of lock sequences that would have lead to a deadlock situation that Neo4j has detected and adverted (by throwing DeadlockDetectedException). | Integer |
MBean Transactions
Attribute | Description | Type |
---|---|---|
| The number of currently open transactions | Integer |
| The highest number of transactions ever opened concurrently | Integer |
| The total number started transactions | Integer |
| The total number of committed transactionss | Integer |
MBean Cache
Attribute | Description | Type |
---|---|---|
| The type of cache used by Neo4j | String |
| The number of Nodes currently in cache | Integer |
| The number of Relationships currently in cache | Integer |
| clear all caches | function, void |
MBean Configuration
Attribute | Description | Type |
---|---|---|
| Relative path for where the Neo4j storage directory is located | String |
| Use a quick approach for rebuilding the ID generators. This give quicker recovery time, but will limit the ability to reuse the space of deleted entities. | String |
| Relative path for where the Neo4j logical log is located | String |
| The size to allocate for memory mapping the store for property key strings | String |
| The size to allocate for memory mapping the string property store | String |
| The size to allocate for memory mapping the array property store | String |
| Relative path for where the Neo4j storage information file is located | String |
| The size to allocate for memory mapping the relationship store | String |
| The size to allocate for memory mapping the store for property key indexes | String |
| Configuration attribute | String |
| Enable a remote shell server which shell clients can log in to | String |
| The size to allocate for memory mapping the property value store | Integer |
| The size to allocate for memory mapping the node store | String |
| Configuration attribute | String |
MBean Primitive count
Attribute | Description | Type |
---|---|---|
| An estimation of the number of nodes used in this Neo4j instance | Integer |
| An estimation of the number of relationships used in this Neo4j instance | Integer |
| An estimation of the number of properties used in this Neo4j instance | Integer |
| The number of relationship types used in this Neo4j instance | Integer |
MBean XA Resources
Attribute | Description | Type |
---|---|---|
| Information about all XA resources managed by the transaction manager | String |
MBean Store file sizes
Attribute | Description | Type |
---|---|---|
| The total disk space used by this Neo4j instance, in bytes. | Integer |
| The amount of disk space used by the current Neo4j logical log, in bytes. | Integer |
| The amount of disk space used to store array properties, in bytes. | Integer |
| The amount of disk space used to store nodes, in bytes. | Integer |
| The amount of disk space used to store properties (excluding string values and array values), in bytes. | Integer |
| The amount of disk space used to store relationships, in bytes. | Integer |
| The amount of disk space used to store string properties, in bytes. | Integer |
MBean Kernel
Attribute | Description | Type |
---|---|---|
| Whether this is a read only instance. | boolean |
| An ObjectName that can be used as a query for getting all management beans for this Neo4j instance. | String |
| The time from which this Neo4j instance was in operational mode | Date |
| The time when this Neo4j graph store was created | Date |
| An identifier that, together with store creation time, uniquely identifies this Neo4j graph store | String |
| The current version of the Neo4j store logical log | String |
| The version of Neo4j | String |
| The location where the Neo4j store is located | String |
MBean High Availability
Attribute | Description | Type |
---|---|---|
| The cluster machine id of this instance | String |
| True, if this Neo4j instance is currently Master in the cluster | boolean |
| A list of conencted slaves in this cluster | String |
| Information about the other Neo4j instances in this HA cluster | String |
Copyright © 2012 Neo Technology