Getting ready

As the collectd PostgreSQL module needs to log in to a database within the cluster to gather its statistics, we should create a user specifically for this purpose. Execute this SQL query with an appropriate password:

CREATE USER perf_mon WITH PASSWORD 'testpw';

In addition, follow the instructions in the Installing and configuring collectd recipe so that there is a fully-functional collectd client and server.

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.