In this section, we discuss the types of event logs provided by NDB Cluster, and the types of events that are logged.
NDB Cluster provides two types of event log:
The cluster log, which includes events generated by all cluster nodes. The cluster log is the log recommended for most uses because it provides logging information for an entire cluster in a single location.
By default, the cluster log is saved to a file named
ndb_
, (wherenode_id
_cluster.lognode_id
is the node ID of the management server) in the management server'sDataDir
.Cluster logging information can also be sent to
stdout
or asyslog
facility in addition to or instead of being saved to a file, as determined by the values set for theDataDir
andLogDestination
configuration parameters. See Section 25.4.3.5, “Defining an NDB Cluster Management Server”, for more information about these parameters.Node logs are local to each node.
Output generated by node event logging is written to the file
ndb_
(wherenode_id
_out.lognode_id
is the node's node ID) in the node'sDataDir
. Node event logs are generated for both management nodes and data nodes.Node logs are intended to be used only during application development, or for debugging application code.
Each reportable event can be distinguished according to three different criteria:
Category: This can be any one of the following values:
STARTUP
,SHUTDOWN
,STATISTICS
,CHECKPOINT
,NODERESTART
,CONNECTION
,ERROR
, orINFO
.Priority: This is represented by one of the numbers from 0 to 15 inclusive, where 0 indicates “most important” and 15 “least important.”
Severity Level: This can be any one of the following values:
ON
,DEBUG
,INFO
,WARNING
,ERROR
,CRITICAL
,ALERT
, orALL
. (This is also sometimes referred to as the log level.)
The cluster log can be filtered on these properties using the NDB
management client CLUSTERLOG
command. This command affects the cluster log only, and has no
effect on the node logs; debug logging in one or more node logs
can be turned on and off using the ndb_mgm
NODELOG DEBUG
command.
The format used in a log message generated by NDB Cluster (as of NDB 8.0.26) is as shown here:
timestamp [node_type] level -- Node node_id: message
Each line in the log, or log message, contains the following information:
A
timestamp
in
format. The timestamp value currently resolves to whole seconds only; fractional seconds are not supported.YYYY
-MM
-DD
HH
:MM
:SS
The
node_type
, or type of node or application which is performing the logging. In the cluster log, this is always[MgmSrvr]
; in the data node log, it is always[ndbd]
.[NdbApi]
and other values are possible in logs generated by NDB API applications and tools.The
level
of the event, sometimes also referred to as its severity level or log level. See earlier in this section, as well as Section 25.6.3.1, “NDB Cluster Logging Management Commands”, for more information about severity levels.The ID of the node reporting the event (
node_id
).A
message
containing a description of the event. The most common types of events to appear in the log are connections and disconnections between different nodes in the cluster, and when checkpoints occur. In some cases, the description may contain status or other information.
A sample from an actual cluster log is shown here:
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Start phase 5 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Start phase 5 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Start phase 6 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Start phase 6 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: President restarts arbitration thread [state=1]
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Start phase 7 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Start phase 7 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Start phase 8 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Start phase 8 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Start phase 9 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Start phase 9 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Start phase 50 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Start phase 50 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Start phase 101 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Start phase 101 completed (system restart)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Started (mysql-8.0.41 ndb-8.0.41)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Started (mysql-8.0.41 ndb-8.0.41)
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 5: Node 50: API mysql-8.0.41 ndb-8.0.41
2021-06-10 10:01:07 [MgmtSrvr] INFO -- Node 6: Node 50: API mysql-8.0.41 ndb-8.0.41
2021-06-10 10:01:08 [MgmtSrvr] INFO -- Node 6: Prepare arbitrator node 50 [ticket=75fd00010fa8b608]
2021-06-10 10:01:08 [MgmtSrvr] INFO -- Node 5: Started arbitrator node 50 [ticket=75fd00010fa8b608]
2021-06-10 10:01:08 [MgmtSrvr] INFO -- Node 6: Communication to Node 100 opened
2021-06-10 10:01:08 [MgmtSrvr] INFO -- Node 6: Communication to Node 101 opened
2021-06-10 10:01:08 [MgmtSrvr] INFO -- Node 5: Communication to Node 100 opened
2021-06-10 10:01:08 [MgmtSrvr] INFO -- Node 5: Communication to Node 101 opened
2021-06-10 10:01:36 [MgmtSrvr] INFO -- Alloc node id 100 succeeded
2021-06-10 10:01:36 [MgmtSrvr] INFO -- Nodeid 100 allocated for API at 127.0.0.1
2021-06-10 10:01:36 [MgmtSrvr] INFO -- Node 100: mysqld --server-id=1
2021-06-10 10:01:36 [MgmtSrvr] INFO -- Node 5: Node 100 Connected
2021-06-10 10:01:36 [MgmtSrvr] INFO -- Node 6: Node 100 Connected
2021-06-10 10:01:36 [MgmtSrvr] INFO -- Node 5: Node 100: API mysql-8.0.41 ndb-8.0.41
2021-06-10 10:01:36 [MgmtSrvr] INFO -- Node 6: Node 100: API mysql-8.0.41 ndb-8.0.41
For additional information, see Section 25.6.3.2, “NDB Cluster Log Events”.