Welcome to pg_telemetry, an extension for monitoring usage of PostgreSQL.
This module provides functions for deriving usage stats from system stats and other system administration functions. It aims to provide a generally useful and reusable series of metrics functions for monitoring purposes.
Most of the data is set to export numbers and can be used to supply SNMP agents, Zabbix agents, and other monitoring programs with data.
The module is intended to be used with monitoring and visualizaiton programs such as pganalyze, zabbix, and munin. These tend to use an agent which collects performance data and sends it to a server for graphics generation. Some of the functions here are wrapped in views.
A second class of functions are in place for administrators to use in troubleshooting and debugging performance issues. However these are to be used as needed while the general stats functions are assumed to be run every few min at least.
We expect this extension usually to be installed in its own schema. However, it can be safely installed anywhere its names don’t conflict with anything else.
In the initial phase, there are several areas of focus for this project:
Currently this is expected to require PostgreSQL 10+.
This module also requires that pg_stat_statements is installed.
See the pgtelemetry.html in the doc folder.
pg_stats_statements must be installed and preloaded. Once that is the case, you can use the standard make/make install process to install this extension:
That copies the files into the PostgreSQL extensions directory. In some cases (Windows) you may need to install appropriate development tools such as MinGW and on Linux in some cases you may need the development libraries.
After that, in the database you want to base your monitoring on:
create extension pgtelemetry;
This will create the pgtelemetry schema and place all the objects there.
In the extras directory there are a number of important integration examples.
What is too big? To high? Too long? These are set in the beginning of the scripts making this easy to integrate with Zabbix.