Background: I've got quite some experience running and automating MySQL Clusters with several independent replication streams. However I rarely had to run an PostgreSQL replication myself. They were either managed by some other team or fully managed Amazon RDS. Now I need care for a replicated PostgreSQL setup myself and need some help.
We've got an PostgreSQL 9.5 setup with (at least) one slave replicating from a master. Mostly for failover purposes. We are not running a real HA setup (yet).
For Monitoring we use Prometheus and an PostgreSQL Exporter for Prometheus. This service executes queries and provides the results to the monitoring system.
With MySQL monitoring the replication process was easy. You had to make sure that the slaves were streaming binlogs from the server and applying those locally. Usually it was OK to just check for the Seconds_Behind_Master. With PostgreSQL it seems to be a little harder.
Question: What are the most important metrics/properties to make sure my replication is running properly and that we can promote the slave to a master any time?