Monitoring a Failover Manager Cluster v4
You can use either the Failover Manager
efm cluster-status command or the PEM Client graphical interface to check the current status of a monitored node of a Failover Manager cluster.
The efm cluster-status cluster properties file command returns a report that contains information about the status of the Failover Manager cluster. To invoke the command, enter:
The following status report is for a cluster named edb that has three nodes running:
The cluster status section provides an overview of the status of the agents that reside on each node of the cluster:
The asterisk (*) after the VIP address indicates that the address is available for connections. If a VIP address is not followed by an asterisk, the address has been associated with the node (in the properties file), but the address is not currently in use.
Failover Manager agents provide the information displayed in the Cluster Status section.
Allowed node host list and
Standby priority host list provide an easy way to tell which nodes are allowed to join the cluster, and the promotion order of the nodes. The IP address of the Membership coordinator is also displayed in the report:
Promote Status section of the report is the result of a direct query from the node on which you are invoking the cluster-status command to each database in the cluster; the query also returns the transaction log location of each database. Because the queries to each database return at different points in time, the LSNs may not match even if streaming replication is working normally for the cluster.
If a database is down (or if the database has been restarted, but the resume command has not yet been invoked), the state of the agent that resides on that host will be Idle. If an agent is idle, the cluster status report will include a summary of the condition of the idle node. For example:
The cluster status process returns an exit code that is based on the state of the cluster:
An exit code of
0indicates that all agents are running, and the databases on the Primary and Standby nodes are running and in sync.
A non-zero exit code indicates that there is a problem. The following problems can trigger a non-zero exit code:
A database is down or unknown (or has an idle agent).
Failover Manager cannot decrypt the provided database password.
There is a problem contacting the databases to get WAL locations.
There is no Primary agent.
There are no Standby agents.
One or more Standby nodes are not in sync with the Primary.
If you use Postgres Enterprise Manager (PEM) to monitor your servers, you can configure the Streaming Replication Analysis dashboard (part of the PEM graphical interface) to display the state of a Primary or Standby node that is part of a Streaming Replication scenario.
The Streaming Replication Analysis Dashboard displays statistical information about activity for any monitored server on which streaming replication is enabled. The dashboard header identifies the status of the monitored server (either Replication Primary or Replication Slave), and displays the date and time that the server was last started, the date and time that the page was last updated, and a current count of triggered alerts for the server.
When reviewing the dashboard for a Replication Slave (a Standby node), a label at the bottom of the dashboard confirms the status of the server.
By default, the PEM replication probes that provide information for the Streaming Replication Analysis dashboard are disabled.
To view the Streaming Replication Analysis dashboard for the Primary node of a replication scenario, you must enable the following probes:
- Streaming Replication
- WAL Archive Status
To view the Streaming Replication Analysis dashboard for the Standby node of a replication scenario, you must enable the following probes:
- Streaming Replication Lag Time
For more information about PEM, please visit the EnterpriseDB website at: