Installing and configuring collectd
When monitoring multiple clusters of servers, we need a data collection method that's both scalable and configurable. The collectd daemon is a scalable statistics-gathering service, perfect for large clusters as it operates on a client-server model. A common collectd cluster may look like this, with collectd running on every server:
We can direct the statistics of several PostgreSQL servers to a central aggregate server. This server may process the data directly or forward it to a graph system for easy visualization. To gain this type of functionality, we need to spend some time installing and configuring collectd.
Getting ready
For the sake of completeness, obtain a copy of the latest collectd source code. At the time of writing this book, the latest version is 5.6.1, released on October 6, 2016. Download the latest copy of the collectd source code from this URL: https://collectd.org/download.shtml
In order for collectd to interface with PostgreSQL, we need...