Skip to content

Monitoring

Three things to watch: the RCS's HA status, the pglookout daemons, and the HA Events Log.

HA status

An HA Active icon with a spinner means High Availability is running on the RCS.

When it is not:

HA inactive indicator

Inspecting the daemons

The High Availability tab lists the pglookout daemons.

The pglookout daemon list of an RCS

See pglookout Heartbeat for what the State and connection columns mean.

Click a line to open the daemon.

pglookout and mpypgd

The daemon deployed today is pglookout. It may eventually be replaced by mpypgd, an evolution of it — which is why you will see that name in field help and log entries.

A pglookout daemon form

The form shows:

Field Meaning
State Daemon status — Ok, or not installed.
Host The Host the daemon runs on.
Owned PG Cluster The cluster this daemon is responsible for. Leave it empty to create an observer — a node that owns no cluster and exists only to feed the consensus with replication statistics seen from another point on the network.
State URL The daemon runs a small HTTP server publishing its statistics as JSON. Click the URL to open them.
Systemd Service Muppy deploys the daemon as a systemd service. Opens the Muppy Systemd Service Unit that configures and controls it.
Configuration The daemon's configuration.

Header buttons:

Button Effect
Update RCS Stats Fetch replication statistics from the State URL and use them to update the RCS's replication statistics.
Reconfigure Recompute the configuration and push it to the daemon.
Reinstall Reinstall the daemon from scratch.
Uninstall Uninstall the daemon and reconfigure all the others — every daemon connects to every cluster, so removing one changes the others' configuration.

HA Events Log

Most HA events are recorded in the HA Events Log, opened from the button of that name in the RCS header.

The HA Events Log button

Use it to reconstruct the timeline of a failover after the fact.

QUERY_STATE events carry the replication statistics as they stood at that moment. In the example below the primary has stopped answering, and you can read off which standby had the smallest lag.

A QUERY_STATE entry in the HA Events Log

Purging the log

Every 6 hours, Muppy deletes HA events older than 740 hours (about 31 days).

The scheduled action is Muppy: Purge PostgreSQL HA Event History, under Settings / Technical / Automation / Scheduled Actions.

With Muppy Enterprise you can change both the retention period and the purge frequency from that scheduled action's form:

Editing the purge scheduled action

  1. The purge frequency.
  2. The retention period — the retention_period_in_hours argument in the action's code.

Save, and the change applies at the Next Execution Date. Use Run Manually to purge straight away.