PyMunin Multigraph Munin Plugin for monitoring PostgreSQL Database Server.

Multigraph Plugin: Yes
Multi-instance Plugin: Yes


The plugin implements the following graphs:

  • pg_connections

  • pg_diskspace

  • pg_blockreads

  • pg_xact

  • pg_checkpoints

  • pg_bgwriter

  • pg_tup_read

  • pg_tup_write

  • pg_lock_all

  • pg_lock_wait

  • pg_repl_conflicts

  • pg_blockreads_detail

  • pg_xact_commit_detail

  • pg_xact_rollback_detail

  • pg_tup_return_detail

  • pg_tup_fetch_detail

  • pg_tup_delete_detail

  • pg_tup_update_detail

  • pg_tup_insert_detail

  • pg_lock_all_detail

  • pg_lock_wait_detail

  • pg_repl_conflicts_detail


Sample graphs for plugin:

PostgreSQL Connections PostgreSQL Disk Space
PostgreSQL Block Reads PostgreSQL Transactions
PostgreSQL Tuple Reads PostgreSQL Tuple Writes
PostgreSQL BgWriter Stats PostgreSQL Checkpoints
PostgreSQL Locks (All) PostgreSQL Locks (Wait)


Configuration variables are passed to the Munin Plugins using environment variables. The environment variables for plugins are usually set in the plugin configuration files in the folder: /etc/munin/plugin-conf.d

The configuration variables implemented by the plugin are listed in the following table:

Variable Description
host PostgreSQL Server IP
(Defaults to UNIX socket if not provided.)
port PostgreSQL Server Port
(Defaults to 5432 for network connections.)
database PostgreSQL Database for monitoring connection
(The default is the login the for connecting user.)
user Database User Name
(The default is the login of OS user for UNIX sockets.
Must be specified for network connections.)
password Database User Password
(Attempt login without password by default.)
include_db Comma separated list of databases to include in detail graphs.
(All enabled by default.)
exclude_db Comma separated list of databases to exclude from detail graphs.
detail_graphs Enable (on) / disable (off) detail graphs.
(Disabled by default.)
repl_graphs Enable (on) / disable (off) replication status graphs.
(Disabled by default.)
include_graphs Comma separated list of enabled graphs.
(All graphs enabled by default.)
exclude_graphs Comma separated list of disabled graphs.

Additionally the following configuration variables are implemented by the plugin for Multi Instance support:

Variable Description
instance_name Name of instance.
instance_label Graph title label for instance. (Default is the same as instance name.)
instance_label_format Controls how the instance label will be added to the graph title:
  • suffix (Default)
  • prefix
  • none


PostgreSQL Database Server Plugin ( pgstats ) has been developed by Ali Onur Uyar ([aouyar @ GitHub] (https://github.com/aouyar)).


PostgreSQL Database Server Plugin ( pgstats ) is copyrighted free software made available under the terms of the GPL License Version 3 or later.

See the file COPYING that acompanies the code for full licensing information.