Skip to content
Repository with example accompanying blog post about monitoring Neo4j and custom metrics
Branch: master
Clone or download
Latest commit 25e75b9 Jun 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Initial commit Jun 3, 2019
.gitignore Initial commit Jun 3, 2019
README.md Update README.md Jun 15, 2019
pom.xml Initial commit Jun 3, 2019

README.md

Monitoring procedure example

This is a repository accompanying a blogs post about how to create custom metrics in Neo4j and publish them to Prometheus, and visualise them in Grafana.

Monitoring Neo4j and Procedures with Prometheus and Grafana - Part 1

Monitoring Neo4j and Procedures with Prometheus and Grafana - Part 2

This repository contains a single module, where we have an example procedure with our own custom metrics published to Prometheus on the same URl as the Neo4j metrics. The integration test starts a Neo4j Testcontainer where we have Neo4j Enterprise edition. If you want to read more about Neo4j and Testcontainers then read this blog post.

We use a Neo4jContainer and modified it to expose the Prometheus port. To be able to use Prometheus with Neo4j we need to call the withEnterpriseEdition method, and you have to add a container-license-acceptance.txt file to the root directory of your test resources, containing the text "neo4j:3.5.0-enterprise" in one line. With this you will accept the license terms and conditions. You'll find more information about licensing Neo4j here: About Neo4j Licenses. If you are interested in a license, you can contact us directly at GraphAware.

Building

This project uses maven, to build a jar-file with the example procedure. To produce the jar simply package the project with maven:

mvn clean package

This will produce a jar-file,target/monitoring-procedure-examle.jar, that can be deployed into the plugin directory of your Neo4j instance.

Invoking the procedure

When you deployed the procedure, you can call it from the Neo4j browser:

call example.monitoring
You can’t perform that action at this time.