mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 15:16:29 +00:00
This is advertised in the --help output and placeholder code was in place, but it wasn't actually implemented.
105 lines
2.8 KiB
Plaintext
105 lines
2.8 KiB
Plaintext
<refentry id="repmgr-node-check">
|
|
<indexterm>
|
|
<primary>repmgr node check</primary>
|
|
</indexterm>
|
|
|
|
<refmeta>
|
|
<refentrytitle>repmgr node check</refentrytitle>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>repmgr node check</refname>
|
|
<refpurpose>performs some health checks on a node from a replication perspective</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<para>
|
|
Performs some health checks on a node from a replication perspective.
|
|
This command must be run on the local node.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Example</title>
|
|
<para>
|
|
<programlisting>
|
|
$ repmgr -f /etc/repmgr.conf node check
|
|
Node "node1":
|
|
Server role: OK (node is primary)
|
|
Replication lag: OK (N/A - node is primary)
|
|
WAL archiving: OK (0 pending files)
|
|
Downstream servers: OK (2 of 2 downstream nodes attached)
|
|
Replication slots: OK (node has no replication slots)</programlisting>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1>
|
|
<title>Individual checks</title>
|
|
<para>
|
|
Each check can be performed individually by supplying
|
|
an additional command line parameter, e.g.:
|
|
<programlisting>
|
|
$ repmgr node check --role
|
|
OK (node is primary)</programlisting>
|
|
</para>
|
|
<para>
|
|
Parameters for individual checks are as follows:
|
|
<itemizedlist spacing="compact" mark="bullet">
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<literal>--role</literal>: checks if the node has the expected role
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<literal>--replication-lag</literal>: checks if the node is lagging by more than
|
|
<varname>replication_lag_warning</varname> or <varname>replication_lag_critical</varname>
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<literal>--archive-ready</literal>: checks for WAL files which have not yet been archived
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<literal>--downstream</literal>: checks that the expected downstream nodes are attached
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<literal>--slots</literal>: checks there are no inactive replication slots
|
|
</simpara>
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>Output format</title>
|
|
<para>
|
|
<itemizedlist spacing="compact" mark="bullet">
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<literal>--csv</literal>: generate output in CSV format (not available
|
|
for individual checks)
|
|
</simpara>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<simpara>
|
|
<literal>--nagios</literal>: generate output in a Nagios-compatible format
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|