Alternative tools
If you prefer other tools over Nagios or Cacti, there are also proper plugins around. Depending on which tools you like, you might even have to come up with your own plugins to do your setup work as intended.
Zabbix plugins
The Zabbix plugin is called pg_monz. More information about this plugin can be found at http://pg-monz.github.io/pg_monz/index-en.html. It basically provides everything you need to integrate Zabbix with PostgreSQL and fetch all of the important information.
pganalyze-collector
The pganalyze-collector is a command-line tool that collects information about Postgres databases as well as queries executed on them. All of the data is converted to JSON (JavaScript Object Notation) and can be used by a tool of your choice for processing.
The module creates information about CPU, memory, RAM, tables, schemas, databases, queries, and so on.
This module can be downloaded from:
pg_view – a simple alternative
The pg_view...