pg_statsinfo library has the following functionalities.
pg_statsinfo daemon consists of Logger, Collector, and Writer.
Logger parses CSV logs written by PostgreSQL server and receives messages from Collector and Writer, and does the following items:
Collector connects to the monitored instance, and does the following items:
Writer receives checkpoints and autovacuum activities from Logger and snapshots from Collector, and does the following items: