Note Metrics reporting is only available in the Neo4j Enterprise Edition. |
Introducing Metrics
Neo4j Enterprise can be configured to continuously export Neo4j-specific metrics to Graphite or CSV files. This makes it easy to monitor the health of running Neo4j instances.
Neo4j Enterprise can expose metrics for the following parts of the database, and does so by default:
// default setting for enabling all supported metrics metrics.enabled=true // default setting for enabling all Neo4j specific metrics metrics.neo4j.enabled=true // setting for exposing metrics about transactions; number of transactions started, committed, etc. metrics.neo4j.tx.enabled=true // setting for exposing metrics about the Neo4j page cache; page faults, evictions, flushes and exceptions, etc. metrics.neo4j.pagecache.enabled=true // setting for exposing metrics about approximately entities are in the database; nodes, relationships, properties, etc. metrics.neo4j.counts.enabled=true // setting for exposing metrics about the network usage of the HA cluster component metrics.neo4j.network.enabled=true
Graphite Configuration
For Graphite integration add the following settings to neo4j.conf:
metrics.graphite.enabled=true // default is 'false' metrics.graphite.server=<ip>:2003 metrics.graphite.interval=<how often to send data, defaults to 3s> metrics.prefix=<Neo4j instance name, e.g. wwwneo1>
Start the Neo4j Server and connect to Graphite via a web browser in order to monitor your Neo4j metrics.
Export to CSV Configuration
For storing metrics in local CSV files add the following settings to neo4j.conf:
metrics.csv.enabled=true // default is 'false' dbms.directories.metrics=<file or directory path, defaults to "metrics/" in the store directory> metrics.csv.interval=<how often to store data, defaults to 3s>
Note The CSV exporter does not automatically rotate the output files, so it is recommended to also set up a CRON job to periodically archive the files. |
Configuration Settings Reference for Metrics
See the configuration reference section for detailed documentation on available configuration options.
Available Metrics
Database CheckPointing Metrics
Name | Description |
---|---|
| The total number of check point events executed so far |
| The total time spent in check pointing so far |
| The duration of the check point event |
Database Data Metrics
Name | Description |
---|---|
| The total number of different relationship types stored in the database |
| The total number of different property names used in the database |
| The total number of relationships stored in the database |
| The total number of nodes stored in the database |
Database PageCache Metrics
Name | Description |
---|---|
| The total number of exceptions seen during the eviction process in the page cache |
| The total number of flushes executed by the page cache |
| The total number of page unpins executed by the page cache |
| The total number of page pins executed by the page cache |
| The total number of page evictions executed by the page cache |
| The total number of page faults happened in the page cache |
Database Transaction Metrics
Name | Description |
---|---|
| The total number of started transactions |
| The highest peak of concurrent transactions ever seen on this machine |
| The number of currently active transactions |
| The number of currently active read transactions |
| The number of currently active write transactions |
| The total number of committed transactions |
| The total number of committed read transactions |
| The total number of committed write transactions |
| The total number of rolled back transactions |
| The total number of rolled back read transactions |
| The total number of rolled back write transactions |
| The total number of terminated transactions |
| The total number of terminated read transactions |
| The total number of terminated write transactions |
| The ID of the last committed transaction |
| The ID of the last closed transaction |
Cypher Metrics
Name | Description |
---|---|
| The total number of times Cypher has decided to re-plan a query |
Database LogRotation Metrics
Name | Description |
---|---|
| The total number of transaction log rotations executed so far |
| The total time spent in rotating transaction logs so far |
| The duration of the log rotation event |
Network Metrics
Name | Description |
---|---|
| The amount of bytes transmitted on the network containing the transaction data from a slave to the master in order to be committed |
| The amount of bytes transmitted on the network while copying stores from a machines to another |
| The amount of bytes transmitted on the network containing the transaction data from a master to the slaves in order to propagate committed transactions |
Cluster Metrics
Name | Description |
---|---|
| The total number of update pulls executed by this instance |
| The highest transaction id that has been pulled in the last pull updates by this instance |
| Whether or not this instance is the master in the cluster |
| Whether or not this instance is available in the cluster |
Core Metrics
Name | Description |
---|---|
| Append index of the RAFT log |
| Commit index of the RAFT log |
| RAFT Term of this server |
| Leader was not found while attempting to commit a transaction |
| TX pull requests received from edge servers |
| Transaction retries |
| Is this server the leader? |
| How many RAFT messages were dropped? |
| How many RAFT messages are queued up? |
Java Virtual Machine Metrics
These metrics are environment dependent and they may vary on different hardware and with JVM configurations. Typically these metrics will show information about garbage collections (for example the number of events and time spent collecting), memory pools and buffers, and finally the number of active threads running.