Get Nodes
Returns postgres HA state of all nodes from this appliance's point of view.
Request
URI
GET
https://{api_host}/api/1.0.0/nodes
COPY
Responses
200
OK
Returns
NodesStatus
of type(s)
application/json
{
"localClusterFailover": "string",
"localClusterHealth": "string",
"localClusterState": [
{
"connectionString": "string",
"location": "string",
"name": "string",
"nodeHealth": "string",
"nodeRole": "string",
"failover": {
"mode": "string",
"details": "string",
"repmgrd": {
"status": "string",
"details": "string"
}
},
"id": 0,
"role": "string",
"status": "string",
"upstream": "string"
}
],
"warnings": [
"string"
]
}
string
localClusterFailover
Optional
HA Cluster failover status from the perspective of this appliance. Valid states are:
- MANUAL - all nodes have failover value set to manual in repmgrd config file and repmgrd service is not running
- AUTOMATIC - all nodes have failover value set to automatic in repmgrd config file and repmgrd service is running
- INDETERMINATE - all nodes have inconsisent state of failover set to either manual or automatic and repmgrd service is either running or not running
string
localClusterHealth
Optional
HA Cluster status from the perspective of this appliance. Valid states are:
- HEALTHY - all nodes online and no warnings or conflicts
- DEGRADED - One standby node is offline, such that only one remaining standby node is still healthy. It is recommended that a minimum of two healthy standby nodes are maintained at all times.
- READ_ONLY_PRIMARY - The primary is in read-only mode. This happens when there is not at least one active standby that is connected to the primary.
- NO_ACTIVE_PRIMARY - There is no active primary running. In this case, an available standby should be promoted as a new primary.
- CRITICAL_PROBLEM - Either two primaries are showing up in repmgr inventory, or a standby is following an "old" primary (not the current primary)
- SSH_PROBLEM - An ssh problem exists between two or more nodes. This can happen when the trust has been lost between these nodes.
array of
object
localClusterState
Optional
The current list of nodes and their status.
array of
string
warnings
Optional
warnings
404
API not applicable for cell-type appliances
Operation doesn't return any data structure
Code Samples
COPY
curl -H 'Authorization: <value>' https://{api_host}/api/1.0.0/nodes