Kubernetes Postgres Healthcheck SLI

Icon 1 3 Troubleshooting Commands

Icon 2 Contributed by stewartshea

Icon 2 Codecollection: rw-cli-codecollection


Runs multiple Kubernetes and psql commands to report on the health of a postgres cluster. Produces a value between 0 (completely failing thet test) and 1 (fully passing the test). Checks for database lag & backup health.

Tasks:
  • Check Patroni Database Lag in Namespace `${NAMESPACE}` on Host `${HOSTNAME}` using `patronictl`
  • Check Database Backup Status for Cluster `${OBJECT_NAME}` in Namespace `${NAMESPACE}`
  • Generate Namespace Score for Namespace `${NAMESPACE}`