Neo4j Admin report

The neo4j-admin server report command collects information about the Neo4j deployment and saves it to an archive (ZIP/TAR) for remote assessments.

Syntax

The neo4j-admin server report command has the following syntax:

neo4j-admin server report [-h]
                          [--expand-commands] [--list] [--verbose]
                          [--ignore-disk-space-check[=true|false]]
                          [--additional-config=<file>] [--database=<database>]
                          [--to-path=<path>] [<classifier>...] [COMMAND]

Description

The command collects information about the system and packages everything in an archive. If you specify all, everything is included. You can also finetune the selection by passing classifiers to the tool, e.g logs tx threads.

Starting from Neo4j version 5.16, the Neo4j Admin report tool allows you to choose the databases for which you want to include database-specific information. You can generate a report covering all databases in the DBMS, a specific database, or databases that match a specified pattern. For example, if you run the command neo4j-admin server report --database=ne*, a report will be generated for all databases that start with "ne". If not specified, the tool generates a report for all databases in the DBMS.

This tool does not send any information automatically. To share this information with the Neo4j Support organization, you have to send it manually.

Parameters

Table 1. neo4j-admin server report parameters
Parameter Default

[<classifier>…​]

[config, logs, metrics, plugins, ps, sysprop, threads, tree, version]

Table 2. Classifiers
Classifier Online Description

all

Include all of the available classifiers.

ccstate

Include the current cluster state.

config

Include Neo4j configuration files.

heap

Include a heap dump.

logs

Include log files, e.g., debug.log, neo4j.log, etc.

metrics

Include the collected metrics.

plugins

Include a text view of the plugin directory (no files are collected).

ps

Include a list of running processes.

raft

Include the raft log.

sysprop

Include a list of Java system properties.

threads

Include a thread dump of the running instance.

tree

Include a text view of the folder structure of the data directory (no files are collected).

tx

Include transaction logs.

The classifiers marked as Online work only when you have a running Neo4j instance that the tool can find.

If no classifiers are specified, the following classifiers are used: logs, config, plugins, tree, metrics, threads, sysprop, ps, and version.

The reporting tool does not read any data from your database. However, the heap, the raft logs, and the transaction logs may contain data. Additionally, even though the standard neo4j.conf file does not contain password information, for specific configurations, it may have this type of information. Therefore, be aware of your organization’s data security rules before using the classifiers heap, tx, raft, and config.

Options

The neo4j-admin server report command has the following options:

Table 3. neo4j-admin server report options
Option Description Default

--additional-config=<file>

Configuration file with additional configuration.

--database=<database>

Name of the database to report for. Can contain * and ? for globbing. Note that * and ? have special meaning in some shells and might need to be escaped or used with quotes.

*

--expand-commands

Allow command expansion in config value evaluation.

-h, --help

Show this help message and exit.

--ignore-disk-space-check[=true|false]

Ignore disk full warning.

false

--list

List all available classifiers.

--to-path=<path>

Destination directory for reports. Defaults to a system tmp directory.

--verbose

Enable verbose output.

By default, the tool tries to estimate the final size of the report and uses that to assert that there is enough disk space available for it. If there is not enough available space, the tool aborts. However, this estimation is pessimistic and does not consider compression. Therefore, if you are confident that you do have enough disk space, you can disable this check with the option --ignore-disk-space-check.

Examples

This tool uses the Java Attach API to gather data from a running Neo4j instance. Therefore, it requires the Java JDK to run properly.

Example 1. Invoke neo4j-admin server report using the default classifiers

The following command gathers information about the Neo4j instance using the default classifiers and saves it to the default location:

$neo4j-home> bin/neo4j-admin server report
Example 2. Invoke neo4j-admin server report using all classifiers

The following command gathers information about the Neo4j instance using all classifiers and saves it to a specified location:

$neo4j-home> bin/neo4j-admin server report --to-path=./report all
Example 3. Invoke neo4j-admin server report to gather only logs and thread dumps

The following command gathers only logs and thread dumps from the running Neo4j instance and saves it to a specified location:

$neo4j-home> bin/neo4j-admin server report --to-path=./report threads logs