cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to get values for some metrics for monitoring purpose from Neo4j using Bolt in Java

We would like to know how to get the details listed below using any queries or function calls or in some other way in Neo4j for the Purpose of Monitoring. We are planning to periodically retrieve the data from the Neo4j using a Java program. We a using the neo4j-java-driver-1.7.3.jar for collecting the data. Please let us know the methods to collect the below data using Java. We do not want JMX for Monitoring. We would like to make use of Bolt to collect all our required details. Please let us know the method of retrieval for both free and paid versions which will help us.

Data Needed.

1) Java Details

  1. Total Physical Memory Size

  2. Used Physical Memory Size

  3. Commited Virtual Memory Size

  4. Total Swap Space Size

  5. Free Swap Space Size

  6. Total GC Pause Time

  7. Last GC Duration

  8. Daemon Thread Count

  9. Peak Thread Count

  10. Live Thread Count

  11. Total Started Thread Count

  12. Committed Heap Memory

  13. Initial Heap Memory

  14. Used Heap Memory

  15. Committed Non Heap Memory

  16. Initial Non Heap Memory

  17. Used Non Heap Memory

2) Transaction Details

  1. Committed Transactions

  2. Started Transactions

  3. Open Transactions

  4. Peak Concurrent Transactions

3) Clustering Details

  1. Replicated State Size
1 REPLY 1

You can either call the queryJmx procedure via bolt and get the data.

We also added support to apoc for retrieving CSV metrics files from the server

procedure

apoc.metrics.list

apoc.metrics.list() - get a list of available metrics

procedure

apoc.metrics.storage

apoc.metrics.storage(directorySetting) - retrieve storage metrics about the devices Neo4j uses for data storage. directorySetting may be any valid neo4j directory setting name, such as 'dbms.directories.data'. If null is provided as a directorySetting, you will get back all available directory settings. For a list of available directory settings, see the Neo4j operations manual reference on configuration settings. Directory settings are not paths, they are a neo4j.conf setting key name

procedure

apoc.metrics.get

apoc.metrics.get(metricName, {}) - retrieve a system metric by its metric name. Additional configuration options may be passed matching the options available for apoc.load.csv.