Connects to one or more Postgres databases and checks for a variety of things. An action is either given on the command line, or inferred from the name of the executable by using symlinks. The current list of actions is: backends, bloat, connection, database_size, disk_space, index_size, last_analyze, last_vacuum, listener, locks, logfile, query_runtime, query_time, relation_size, settings_checksum, table_size, timesync, txn_wraparound, and version. Most standard nagios options are supported, including --timeout. All that is required is a local psql executable. Licensed under BSD, see web page for full documentation.

Was looking for a similar plugin like check_mysql to get some Postgres stats. check_postgres does the job and much more. Once I figured out how to use it correctly (--action is required), it worked great. Thanks for your work!

I always wanted to write a check_postgres_health to join the family of my database plugins. But with an existing plugin like this one, it would be a waste of time.
So many features, consistent command line parameters, clean code... A very useful plugin!