How to do it...

Perform these steps on any Pacemaker node as the root user:

  1. Add an e-mail primitive to Pacemaker with crm:
        crm configure primitive pg_mail ocf:heartbeat:MailTo \
            params email="dbas@mycompany.com" \
                  subject="Pacemaker\ cluster\ status\ changed:\ "
  1. Clean up any errors that might have accumulated with crm:
        crm resource cleanup pg_mail
  1. Display the status of our new e-mail alert with crm:
        crm resource status

Get PostgreSQL High Availability Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.