pgd cluster show
================

Synopsis
--------

The ``pgd cluster show`` command is used to display the cluster-level
information in the EDB Postgres Distributed cluster.

Users and roles
^^^^^^^^^^^^^^^

Requires the ``bdr_superuser`` role. See :ref:`User roles <User roles>`  .

Syntax
------

.. code:: plaintext

   pgd cluster show [OPTIONS]

Options
-------

The following table lists the options available for the
``pgd cluster show`` command:

.. csv-table::
  :header: Short,Long,Description
  :widths: 12,15,25
  :align: left
  :class: longtable

  "",--clock-drift,Only show detailed clock drift information.
  "",--summary,Only show cluster summary information.
  "",--health,Only show cluster health information.

Only one of the above options can be specified at a time.

See also `Global Options <https://www.enterprisedb.com/docs/pgd/latest/reference/cli/command_ref/#global-options>`_  .

Clock Drift
-----------

Please note that the current implementation of clock drift may return an
inaccurate value if the cluster is under high load while running this
command or has large number of nodes in it.

.. csv-table::
  :header: Symbol,Meaning
  :widths: 10,30
  :align: left
  :class: longtable

  `*`,ok
  `~`,warning (drift > 2 seconds)
  `!`,critical (drift > 5 seconds)
  `x`,down / unreachable
  `?`,unknown
  `-`,not applicable

Examples
--------

Display the cluster information
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code:: shell

   pgd cluster show
   __OUTPUT__

   #  Summary

   Group Name    Parent Group  Group Type Node Name Node Kind
   - ------------ ------------- ---------- --------- ---------
   democluster                 global                        
   dc1_subgroup  democluster   data       kaboom    data     
   dc1_subgroup  democluster   data       kaftan    data     
   dc1_subgroup  democluster   data       kaolin    data     

   #  Health

   Check             Status Details                                        
   - ---------------- ------ -----------------------------------------------
   Connections       Ok     All BDR nodes are accessible                   
   Raft              Ok     Raft Consensus is working correctly            
   Replication Slots Ok     All PGD replication slots are working correctly
   Clock Drift       Ok     Clock drift is within permissible limit        
   Versions          Ok     All nodes are running the same PGD version     

   #  Clock Drift

   Reference Node Node Name Clock Drift
   - ------------- --------- -----------
   kaftan         kaboom    *          
   kaftan         kaolin    *     
