This section describes how to see what is happening with Neo4j running on Kubernetes.
When using the Helm Chart, Neo4j logging output is written to files in the
This directory is mounted on a
PersistentVolume so that logs are persisted if the pod is moved or restarted.
For full details of Neo4j logging, see Neo4j logging.
To view the Neo4j user log (neo4j.log), use the command
kubectl exec:Follow neo4j.log
kubectl exec <neo4j-pod-name> -- tail -f /logs/neo4j.log
To copy the log files from a Neo4j instance, use
kubectl cp:Copy all logs
$ kubectl cp <neo4j-pod-name>:/logs neo4j-logs/ $ ls neo4j-logs debug.log neo4j.log query.log security.log
The Neo4j log output can be collected from the log files and sent to a unified location using tools, such as Fluentd (https://www.fluentd.org) or Logstash (https://www.elastic.co/logstash). We recommend running these either as "sidecar" containers in the Neo4j pods or as separate DaemonSets.
If Neo4j is configured to listen for Graphite, JMX, or Prometheus connections for metrics, those services can be accessed as described in Access a Neo4j Helm release.
The Helm Chart supports standard Neo4j metrics configuration settings, for example:
# To listen for Prometheus connections config: metrics.prometheus.enabled: "true" metrics.prometheus.endpoint: "0.0.0.0:2004"
# To publish Graphite connections config: metrics.graphite.enabled: "true" metrics.graphite.interval: "3s" metrics.graphite.server: "graphite.default.svc.cluster.local:2003"
# To write CSV metrics config: metrics.csv.enabled: "true" metrics.csv.interval: "10s"
# To enable JMX config: metrics.jmx.enabled: "true"
For more information and examples, see Neo4j metrics.
Was this page helpful?