Skip to content

Commit 177776c

Browse files
committed
Align with other monitoring sections
1 parent 3618647 commit 177776c

File tree

1 file changed

+49
-32
lines changed

1 file changed

+49
-32
lines changed

modules/ROOT/pages/clustering/monitoring/status-check.adoc

Lines changed: 49 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
:description: This section describes how to monitor a database's availability with the help of the cluster status check procedure.
22

33
:page-role: enterprise-edition new-5.24
4-
[[cluster-status-check]]
5-
= Cluster status check
4+
[[monitoring-replication]]
5+
= Monitor replication for status information
66

7-
Neo4j 5.24 introduces the xref:reference/procedures.adoc#procedure_dbms_cluster_statusCheck[`dbms.cluster.statusCheck()`] procedure, which can be used to monitor the ability to replicate in clustered databases, which in most cases means being able to write to the database.
8-
You can also use the procedure to check which members are up-to-date and can participate in a successful replication.
9-
Therefore, it is useful in determining the fault-tolerance of a clustered database as well.
10-
A third and final function is to determine the leader of the cluster.
7+
Neo4j 5.24 introduces the xref:reference/procedures.adoc#procedure_dbms_cluster_statusCheck[`dbms.cluster.statusCheck()`] procedure, which can be used to monitor the ability to replicate in clustered databases.
8+
In most cases this means a clustered database is write available.
9+
The procedure can also be used to check which members of a clustered database are up-to-date and can participate in a successful replication.
10+
Therefore, it is useful in determining the fault-tolerance of a clustered database.
11+
A third and final function is to determine which member is the leader of a clustered database within the cluster.
1112

1213
[NOTE]
1314
====
@@ -18,45 +19,61 @@ Apart from replication there are other stops in the write path that can potentia
1819
However, it tells that the cluster is healthy and in most cases that means that the database is write available.
1920
====
2021

21-
[[procedure-syntax]]
22-
== Syntax
22+
[[cluster-status-check]]
23+
== Cluster status check
2324

25+
*Syntax:*
2426
[source, shell]
2527
----
2628
CALL dbms.cluster.statusCheck(databases :: LIST<STRING>, timeoutMilliseconds = null :: INTEGER)
2729
----
2830

29-
* *databases:* the list of databases for which the status check should run.
30-
Providing an empty list runs the status check for all *clustered* databases on that server, i.e. the status check won't run on singles or secondaries.
31-
* *timeoutMilliseconds:* specifies how long the replication may take.
32-
Default value is 1000 milliseconds.
33-
If replication takes longer than this timeout, it will return that replication is unsuccessful.
31+
*Arguments:*
3432

33+
[options="header", cols="m,a,a"]
34+
|===
35+
| Name | Type | Description
36+
| databases | List<String> | Databases for which the status check should run.
37+
Providing an empty list runs the status check for all *clustered* databases on that server, i.e. it won't run on singles or secondaries.
38+
| timeoutMilliseconds | Integer | How long to allow for replication, before returning it was unsuccessful.
39+
Default value is 1000 milliseconds.
40+
|===
41+
42+
*Returns:*
3543

3644
The procedure returns a row for all primary members of all the requested databases where each row consists of:
3745

38-
* *database:* the database for which the `status check entry` was replicated.
39-
* *serverId:* the server id of each primary member, which did or did not participate in a successful replication of the `status check entry`.
40-
* *serverName:* the server name of each primary member.
41-
* *address:* the Bolt address of each primary member.
42-
* *replicationSuccessful:* indicates if the server (on which the procedure is run) can replicate a transaction.
43-
+
44-
** `TRUE` -- if this server managed to replicate the dummy transaction to a majority of cluster members within the given timeout.
45-
** `FALSE` -- if it failed to replicate within the timeout.
46+
[options="header", cols="m,a,a"]
47+
|===
48+
| Name | Type | Description
49+
| database | String | The database for which a `status check entry` was replicated.
50+
| serverId | String | The UUID of the server, which did or did not participate in a successful replication of the `status check entry`.
51+
| serverName | String | The friendly name of the server, or its UUID if no name is set.
52+
| address | String | The address of the Bolt port for the server.
53+
| replicationSuccessful | String | Indicates if the server (on which the procedure is run) can replicate a transaction.
54+
| memberStatus | String | The status of each primary member.
55+
| recognisedLeader | String | The server id of the perceived leader of each primary member.
56+
| recognisedLeaderTerm | String | The term of the perceived leader of each primary member.
57+
If the members report different leaders, the one with the highest term should be trusted.
58+
| requester | String | Whether a server is the requester or not.
59+
| error | String | Contains the error message if one is present.
60+
An example of an error is that one or more of the requested databases do not exist on the requester.
61+
|===
62+
63+
=== Possible values of `replicationSuccessful`
64+
* `TRUE` -- if this server managed to replicate the dummy transaction to a majority of cluster members within the given timeout.
65+
* `FALSE` -- if it failed to replicate within the timeout.
4666
The value is the same column-wise.
4767
A failed replication can either mean a real issue in the cluster (e.g., no leader) or that this server is too far behind in apply and can't replicate.
48-
* *memberStatus:* shows the status of each primary member.
49-
It can be `APPLYING`, `REPLICATING`, or `UNAVAILABLE`.
50-
+
51-
** `APPLYING` means that the member can replicate and is actively applying transactions.
52-
** `REPLICATING` means that the member can participate in replicating, but can't apply.
68+
69+
=== Possible values of `memberStatus`
70+
* `APPLYING` means that the member can replicate and is actively applying transactions.
71+
* `REPLICATING` means that the member can participate in replicating, but can't apply.
5372
This state is uncommon, but may happen while waiting for the database to start and accept transactions.
54-
* *recognisedLeader:* shows the server id of the perceived leader of each primary member.
55-
* *recognisedLeaderTerm:* shows the term of the perceived leader of each primary member.
56-
If the members report different leaders, the one with the highest term should be trusted.
57-
* *requester:* is `TRUE` for the server on which the procedure is run, and `FALSE` on the remaining servers.
58-
* *error:* contains the error message if there is one.
59-
An example of an error is that one or more of the requested databases doesn't exist on the requester.
73+
74+
=== Possible values of `requester`
75+
* `TRUE` -- for the server on which the procedure is run
76+
* `FALSE` -- on the remaining servers.
6077

6178
In general, you can use the `replicationSuccessful` field to determine overall write-availability, whereas the `memberStatus` field can be checked in order to see whether the database is fault-tolerant or not.
6279

0 commit comments

Comments
 (0)