<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="mysql-cluster-event-reports">
      </a>
      25.6.3 Event Reports Generated in NDB Cluster
     </h3>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="mysql-cluster-logging-management-commands.html">
       25.6.3.1 NDB Cluster Logging Management Commands
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="mysql-cluster-log-events.html">
       25.6.3.2 NDB Cluster Log Events
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="mysql-cluster-log-statistics.html">
       25.6.3.3 Using CLUSTERLOG STATISTICS in the NDB Cluster Management Client
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <a class="indexterm" name="idm46045093554976">
  </a>
  <a class="indexterm" name="idm46045093553488">
  </a>
  <a class="indexterm" name="idm46045093552400">
  </a>
  <a class="indexterm" name="idm46045093551328">
  </a>
  <a class="indexterm" name="idm46045093550256">
  </a>
  <a class="indexterm" name="idm46045093548768">
  </a>
  <p>
   In this section, we discuss the types of event logs provided by
      NDB Cluster, and the types of events that are logged.
  </p>
  <p>
   NDB Cluster provides two types of event log:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      The
      <span class="firstterm">
       cluster log
      </span>
      , 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.
     </p>
     <p>
      By default, the cluster log is saved to a file named
      <code class="filename">
       ndb_
       <em class="replaceable">
        <code>
         node_id
        </code>
       </em>
       _cluster.log
      </code>
      ,
          (where
      <em class="replaceable">
       <code>
        node_id
       </code>
      </em>
      is the node ID of
          the management server) in the management server's
      <a class="link" href="mysql-cluster-mgm-definition.html#ndbparam-mgmd-datadir">
       <code class="literal">
        DataDir
       </code>
      </a>
      .
     </p>
     <p>
      Cluster logging information can also be sent to
      <code class="literal">
       stdout
      </code>
      or a
      <code class="literal">
       syslog
      </code>
      facility in addition to or instead of being saved to a file,
          as determined by the values set for the
      <a class="link" href="mysql-cluster-mgm-definition.html#ndbparam-mgmd-datadir">
       <code class="literal">
        DataDir
       </code>
      </a>
      and
      <a class="link" href="mysql-cluster-mgm-definition.html#ndbparam-mgmd-logdestination">
       <code class="literal">
        LogDestination
       </code>
      </a>
      configuration parameters. See
      <a class="xref" href="mysql-cluster-mgm-definition.html" title="25.4.3.5 Defining an NDB Cluster Management Server">
       Section 25.4.3.5, “Defining an NDB Cluster Management Server”
      </a>
      , for more
          information about these parameters.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="firstterm">
       Node logs
      </span>
      are local to
          each node.
     </p>
     <p>
      Output generated by node event logging is written to the file
      <code class="filename">
       ndb_
       <em class="replaceable">
        <code>
         node_id
        </code>
       </em>
       _out.log
      </code>
      (where
      <em class="replaceable">
       <code>
        node_id
       </code>
      </em>
      is the node's
          node ID) in the node's
      <a class="link" href="mysql-cluster-ndbd-definition.html#ndbparam-ndbd-datadir">
       <code class="literal">
        DataDir
       </code>
      </a>
      . Node event
          logs are generated for both management nodes and data nodes.
     </p>
     <p>
      Node logs are intended to be used only during application
          development, or for debugging application code.
     </p>
    </li>
   </ul>
  </div>
  <p>
   Each reportable event can be distinguished according to three
      different criteria:
  </p>
  <a class="indexterm" name="idm46045093529456">
  </a>
  <a class="indexterm" name="idm46045093527968">
  </a>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <span class="emphasis">
       <em>
        Category
       </em>
      </span>
      : This can be any one of the
          following values:
      <code class="literal">
       STARTUP
      </code>
      ,
      <code class="literal">
       SHUTDOWN
      </code>
      ,
      <code class="literal">
       STATISTICS
      </code>
      ,
      <code class="literal">
       CHECKPOINT
      </code>
      ,
      <code class="literal">
       NODERESTART
      </code>
      ,
      <code class="literal">
       CONNECTION
      </code>
      ,
      <code class="literal">
       ERROR
      </code>
      , or
      <code class="literal">
       INFO
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="emphasis">
       <em>
        Priority
       </em>
      </span>
      : This is represented by one of
          the numbers from 0 to 15 inclusive, where 0 indicates
      <span class="quote">
       “
       <span class="quote">
        most important
       </span>
       ”
      </span>
      and 15
      <span class="quote">
       “
       <span class="quote">
        least
          important.
       </span>
       ”
      </span>
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="emphasis">
       <em>
        Severity Level
       </em>
      </span>
      : This can be any one of
          the following values:
      <code class="literal">
       ON
      </code>
      ,
      <code class="literal">
       DEBUG
      </code>
      ,
      <code class="literal">
       INFO
      </code>
      ,
      <code class="literal">
       WARNING
      </code>
      ,
      <code class="literal">
       ERROR
      </code>
      ,
      <code class="literal">
       CRITICAL
      </code>
      ,
      <code class="literal">
       ALERT
      </code>
      , or
      <code class="literal">
       ALL
      </code>
      . (This is also sometimes referred to as
          the log level.)
     </p>
    </li>
   </ul>
  </div>
  <p>
   The cluster log can be filtered on these properties using the NDB
      management client
   <a class="link" href="mysql-cluster-logging-management-commands.html" title="25.6.3.1 NDB Cluster Logging Management Commands">
    <code class="literal">
     CLUSTERLOG
    </code>
   </a>
   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
   <a class="link" href="mysql-cluster-programs-ndb-mgm.html" title="25.5.5 ndb_mgm — The NDB Cluster Management Client">
    <span class="command">
     <strong>
      ndb_mgm
     </strong>
    </span>
   </a>
   <a class="link" href="mysql-cluster-mgm-client-commands.html#ndbclient-nodelog-debug">
    <code class="literal">
     NODELOG DEBUG
    </code>
   </a>
   command.
  </p>
  <p>
   The format used in a log message generated by NDB Cluster is as
      shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-simple"><div class="docs-select-all right" id="sa14607205"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple"><em class="replaceable">timestamp</em> <span class="token punctuation">[</span><em class="replaceable">node_type</em><span class="token punctuation">]</span> <em class="replaceable">level</em> <span class="token operator">--</span> Node <em class="replaceable">node_id</em><span class="token operator">:</span> <em class="replaceable">message</em></code></pre>
  </div>
  <p>
   Each line in the log, or log message, contains the following
      information:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      A
      <em class="replaceable">
       <code>
        timestamp
       </code>
      </em>
      in
      <code class="literal">
       <em class="replaceable">
        <code>
         YYYY
        </code>
       </em>
       -
       <em class="replaceable">
        <code>
         MM
        </code>
       </em>
       -
       <em class="replaceable">
        <code>
         DD
        </code>
       </em>
       <em class="replaceable">
        <code>
         HH
        </code>
       </em>
       :
       <em class="replaceable">
        <code>
         MM
        </code>
       </em>
       :
       <em class="replaceable">
        <code>
         SS
        </code>
       </em>
      </code>
      format. The timestamp value currently resolves to whole
          seconds only; fractional seconds are not supported.
     </p>
    </li>
    <li class="listitem">
     <p>
      The
      <em class="replaceable">
       <code>
        node_type
       </code>
      </em>
      , or type of node or
          application which is performing the logging. In the cluster
          log, this is always
      <code class="literal">
       [MgmSrvr]
      </code>
      ; in the data
          node log, it is always
      <code class="literal">
       [ndbd]
      </code>
      .
      <code class="literal">
       [NdbApi]
      </code>
      and other values are possible in
          logs generated by NDB API applications and tools.
     </p>
    </li>
    <li class="listitem">
     <p>
      The
      <em class="replaceable">
       <code>
        level
       </code>
      </em>
      of the event, sometimes
          also referred to as its severity level or log level. See
          earlier in this section, as well as
      <a class="xref" href="mysql-cluster-logging-management-commands.html" title="25.6.3.1 NDB Cluster Logging Management Commands">
       Section 25.6.3.1, “NDB Cluster Logging Management Commands”
      </a>
      ,
          for more information about severity levels.
     </p>
    </li>
    <li class="listitem">
     <p>
      The ID of the node reporting the event
          (
      <em class="replaceable">
       <code>
        node_id
       </code>
      </em>
      ).
     </p>
    </li>
    <li class="listitem">
     <p>
      A
      <em class="replaceable">
       <code>
        message
       </code>
      </em>
      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.
     </p>
    </li>
   </ul>
  </div>
  <p>
   A sample from an actual cluster log is shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-simple"><div class="docs-select-all right" id="sa69802103"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-simple">2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Start phase 5 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Start phase 5 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Start phase 6 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Start phase 6 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> President restarts arbitration thread <span class="token punctuation">[</span>state<span class="token operator">=</span>1<span class="token punctuation">]</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Start phase 7 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Start phase 7 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Start phase 8 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Start phase 8 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Start phase 9 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Start phase 9 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Start phase 50 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Start phase 50 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Start phase 101 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Start phase 101 completed <span class="token punctuation">(</span>system restart<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Started <span class="token punctuation">(</span>mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0 ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Started <span class="token punctuation">(</span>mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0 ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0<span class="token punctuation">)</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Node 50<span class="token operator">:</span> API mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0 ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>07 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Node 50<span class="token operator">:</span> API mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0 ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>08 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Prepare arbitrator node 50 <span class="token punctuation">[</span>ticket<span class="token operator">=</span>75fd00010fa8b608<span class="token punctuation">]</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>08 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Started arbitrator node 50 <span class="token punctuation">[</span>ticket<span class="token operator">=</span>75fd00010fa8b608<span class="token punctuation">]</span>
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>08 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Communication to Node 100 opened
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>08 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Communication to Node 101 opened
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>08 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Communication to Node 100 opened
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>08 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Communication to Node 101 opened
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>36 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Alloc node id 100 succeeded
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>36 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Nodeid 100 allocated for API at 127<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>1
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>36 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 100<span class="token operator">:</span> mysqld <span class="token operator">--</span>server<span class="token operator">-</span>id<span class="token operator">=</span>1
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>36 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Node 100 Connected
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>36 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Node 100 Connected
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>36 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 5<span class="token operator">:</span> Node 100<span class="token operator">:</span> API mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0 ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0
2021<span class="token operator">-</span>06<span class="token operator">-</span>10 10<span class="token operator">:</span>01<span class="token operator">:</span>36 <span class="token punctuation">[</span>MgmtSrvr<span class="token punctuation">]</span> INFO     <span class="token operator">--</span> Node 6<span class="token operator">:</span> Node 100<span class="token operator">:</span> API mysql<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0 ndb<span class="token operator">-</span>8<span class="token punctuation">.</span>4<span class="token punctuation">.</span>0</code></pre>
  </div>
  <p>
   For additional information, see
   <a class="xref" href="mysql-cluster-log-events.html" title="25.6.3.2 NDB Cluster Log Events">
    Section 25.6.3.2, “NDB Cluster Log Events”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
