PG_AUTOCTL SHOW EVENTS(1) | pg_auto_failover | PG_AUTOCTL SHOW EVENTS(1) |
pg_autoctl show events - pg_autoctl show events
pg_autoctl show events - Prints monitor's state of nodes in a given formation and group
This command outputs the events that the pg_auto_failover events records about state changes of the pg_auto_failover nodes managed by the monitor:
usage: pg_autoctl show events [ --pgdata --formation --group --count ] --pgdata path to data directory --monitor pg_auto_failover Monitor Postgres URL --formation formation to query, defaults to 'default' --group group to query formation, defaults to all --count how many events to fetch, defaults to 10 --watch display an auto-updating dashboard --json output data in the JSON format
Depending on the terminal window size, a different set of columns is visible in the state part of the output. See pg_autoctl watch.
PGDATA
PG_AUTOCTL_MONITOR
XDG_CONFIG_HOME
XDG_DATA_HOME
$ pg_autoctl show events --count 2 --json [ { "nodeid": 1, "eventid": 15, "groupid": 0, "nodehost": "localhost", "nodename": "node1", "nodeport": 5501, "eventtime": "2021-03-18T12:32:36.103467+01:00", "goalstate": "primary", "description": "Setting goal state of node 1 \"node1\" (localhost:5501) to primary now that at least one secondary candidate node is healthy.", "formationid": "default", "reportedlsn": "0/4000060", "reportedstate": "wait_primary", "reportedrepstate": "async", "candidatepriority": 50, "replicationquorum": true }, { "nodeid": 1, "eventid": 16, "groupid": 0, "nodehost": "localhost", "nodename": "node1", "nodeport": 5501, "eventtime": "2021-03-18T12:32:36.215494+01:00", "goalstate": "primary", "description": "New state is reported by node 1 \"node1\" (localhost:5501): \"primary\"", "formationid": "default", "reportedlsn": "0/4000110", "reportedstate": "primary", "reportedrepstate": "quorum", "candidatepriority": 50, "replicationquorum": true } ]
Microsoft
Copyright (c) Microsoft Corporation. All rights reserved.
November 25, 2023 | 2.1 |