Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1


Remember Me


Current Version
Last Release Date
Compatible With
  • Nagios 3.x
  • Nagios 4.x

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

Checks many things in PostgreSQL and provides rich perfdatas : connectivity, database size, table and index bloat, streaming replication lag, database hit-ratio, etc.
Written in Perl language, the code is very easy to extend to add new features.
check_pgactivity provides many services :

* archive_folder: check archives in given folder.
* archiver: check the archiver status and number of wal files ready to archive.
* autovacuum: check the autovacuum activity.
* backends: number of connections, compared to max_connections.
* backends_status: number of connections in relation to their status.
* backup_label_age: check age of backup_label file.
* bgwriter: check the bgwriter activity.
* btree_bloat: check B-tree index bloat.
* commit_ratio: commit and rollback rate per second and commit ratio since last execution.
* configuration: check the most important settings.
* connection: perform a simple connection test.
* custom_query: perform the given user query.
* database_size: variation of database sizes.
* hit_ratio: check hit ratio on databases.
* hot_standby_delta: check delta in bytes between a master and its hot standbys.
* invalid_indexes: check for invalid indexes.
* is_hot_standby: check if cluster is a hot standby.
* is_master: check if cluster is in production.
* is_replay_paused: check if the replication is paused.
* last_analyze: check the oldest analyze (from autovacuum or not) on the database.
* last_vacuum: check the oldest vacuum (from autovacuum or not) on the database.
* locks: check the number of locks on the hosts.
* longest_query: check the longest running query.
* max_freeze_age: check oldest database in transaction age.
* minor_version: check if the PostgreSQL minor version is the latest one.
* oldest_2pc: check the oldest two-phase commit transaction.
* oldest_idlexact: check the oldest idle transaction.
* pg_dump_backup: check pg_dump backups age and retention policy.
* pga_version: check the version of this check_pgactivity script.
* pgdata_permission: check that the permission on PGDATA is 700.
* replication_slots: check delta in bytes of the replication slots.
* sequences_exhausted: check that auto-incremented colums aren't reaching their upper limit.
* settings: check if the configuration file changed.
* stat_snapshot_age: check stats collector's stats age.
* streaming_delta: check delta in bytes between a master and its standbys in streaming replication.
* table_bloat: check tables bloat.
* table_unlogged: check unlogged tables
* temp_files: check temp files generation.
* uptime: time since postmaster start or configurtion reload.
* wal_files: total number of WAL files.

Works with PostgreSQL from version 7.4 to 11. It just needs psql to connect to the database.
For PostgreSQL 10 and after, check_pgactivity supports monitoring with a non-privileged user.

Check for a check_pgactivity package availability in your Linux distribution before downloading here.

This program is open source, licensed under the PostgreSQL license. For license terms, see the LICENSE provided with the sources.

Please, file issues on github: