repmgr daemon status

repmgr daemon status

display information about the status of repmgrd on each node in the cluster

## Description

This command provides an overview over all active nodes in the cluster and the state of each node's repmgrd instance. It can be used to check the result of repmgr-daemon-pause and repmgr-daemon-unpause operations.

## Execution

`repmgr daemon status` can be executed on any active node in the replication cluster. A valid `repmgr.conf` file is required.

After restarting PostgreSQL on any node, the repmgrd instance will take a second or two before it is able to update its status. Until then, repmgrd will be shown as not running.

## Examples

repmgrd running normally on all nodes:

    $ repmgr -f /etc/repmgr.conf daemon status
     ID | Name  | Role    | Status  | repmgrd | PID  | Paused?
    ----+-------+---------+---------+---------+------+---------
     1  | node1 | primary | running | running | 7851 | no
     2  | node2 | standby | running | running | 7889 | no
     3  | node3 | standby | running | running | 7918 | no

repmgrd paused on all nodes (using repmgr-daemon-pause):

    $ repmgr -f /etc/repmgr.conf daemon status
     ID | Name  | Role    | Status  | repmgrd | PID  | Paused?
    ----+-------+---------+---------+---------+------+---------
     1  | node1 | primary | running | running | 7851 | yes
     2  | node2 | standby | running | running | 7889 | yes
     3  | node3 | standby | running | running | 7918 | yes

repmgrd not running on one node:

    $ repmgr -f /etc/repmgr.conf daemon status
     ID | Name  | Role    | Status  | repmgrd     | PID  | Paused?
    ----+-------+---------+---------+-------------+------+---------
     1  | node1 | primary | running | running     | 7851 | yes
     2  | node2 | standby | running | not running | n/a  | n/a
     3  | node3 | standby | running | running     | 7918 | yes

## Options

`--csv`

- `repmgr daemon status` accepts an optional parameter `--csv`, which outputs the replication cluster's status in a simple CSV format, suitable for parsing by scripts, e.g.:

          $ repmgr -f /etc/repmgr.conf daemon status --csv
          1,node1,primary,1,1,10204,1
          2,node2,standby,1,0,-1,1
          3,node3,standby,1,1,10225,1

  The columns have following meanings:

  - node ID

  - node name

  - node type (primary or standby)

  - PostgreSQL server running

  - repmgrd running (1 = running, 0 = not running)

  - repmgrd PID (-1 if not running)

  - repmgrd paused (1 = paused, 0 = not paused)

`--verbose`

- Display the full text of any database connection error messages

## See also

repmgr-daemon-pause, repmgr-daemon-unpause, repmgr-cluster-show