When monitoring multiple clusters of servers, we need a data collection method that's both scalable and configurable. The Telegraf daemon is a scalable statistics gathering service, perfect for large clusters as it operates in conjunction with InfluxDB in a client-server model. A common Telegraf + InfluxDB cluster may look like this, with Telegraf running on every PostgreSQL server:
While Telegraf works best with InfluxDB, it's not required to start collecting information from the server and PostgreSQL itself. This recipe will explain how to install and configure Telegraf so we have basic performance monitoring at our fingertips.