Database health checks

The GraphDB health check endpoint is at http://localhost:7200/repositories/myrepo/health.

Parameter: checks (By default all checks are run.)
Behaviour: Run only the specified checks.
Accepts multiple values: True.
Values: read-availability, storage-folder, long-running-queries, predicates-statistics, master-status.
Possible responses: HTTP status 200 (the repository is healthy), 206 (the repository needs attention but it is not something critical), 500 (the repository is inconsistent, i.e. some checks failed).

Possible values for health checks and their meaning

Value Description
read-availability Checks whether the repository is readable.
storage-folder Checks if there are at least 20 MB writable left for the storage folder. The mega bytes can be controlled with the system parameter
long-running-queries Checks if there are queries running for more than 20 seconds. The time can be controlled with the system parameter health.max.query.time.seconds. If more than 20 seconds, you either have a slow query or there is a problem with the database.
predicates-statistics Checks if the predicate statistics contain correct values.
master-status Checks whether the master is up and running, can access its workers, and the peers are not lagging. If there are non- readable workers, the status will be yellow. If there are workers that are off, the status will be red.

Default health checks for the different GraphDB editions

Name Free SE EE / Worker EE / Master

Running the health checks

To run the health checks for a particular repository, in the example myrepo, execute the following command:

curl 'http://localhost:7200/repositories/myrepo/health?checks=<value1>&checks=<value2>'
  • an example output for a healthy repository with HTTP status 200:
    "predicates-statistics": "OK",
    "long-running-queries": "OK",
    "read-availability": "OK",
    "status": "green",
    "storage-folder": "OK"
  • an example output for an unhealthy repository with HTTP status 500:
    predicates-statistics: "OK",
    long-running-queries: "OK",
    read-availability: "OK",
    storage-folder: "UNHEALTHY: Permission denied Permission denied",
    status: "red"

The status field in the output means the following:

  • green - all is good;
  • yellow - the repository needs attention;
  • red - the repository is inconsistent in some way.