Alternative PostgreSQL plugin for munin — Part 2
First Alpha Releases
I have finished porting all "virtual" graphs from the official plugins. The source of this release can be found on github.
This is currently a very rough cut release. Keep in mind:
- There is barely any documentation
- The plugin does not support autoconfig
- It is likely that some major refactoring will go on once the docs are written.
- Maybe things will change. Maybe not.
Trying it out
Installing the plugin is fairly easy:
Clone the github repository somewhere and switch to the alpha tag:
git clone https://github.com/exhuma/munin-plugins.git /opt/exhuma/munin-plugins cd /opt/exhuma/munin-plugins git checkout postgres-multigraph/v1.0.0a2
apt-get install python-psycopg2
Symlink the plugin into your munin-node:
ln -s /opt/exhuma/munin-plugins/pg_multigraph /etc/munin/plugins/pg_multigraph
The plugin reads the following environment variables:
- PG_DBNAME (default='template1')
- The database name to connect to.
- PG_USER (default='postgres')
- The username used to connect.
- PG_PASSWORD (default='')
- The password used to connect. If empty, perform a passwordless login.
- PG_HOST (default='')
- The DB host. If empty, connect using the unix domain socket.
- PG_PORT (default=0)
- The port which is used to connect. If 0, connect using the unix domain socket.
- PG_MULTIGRAPHS (default='__all__')
A comma-separated list of which graphs to create. At the time of this writing the following names are accepted:
The special name __all__ causes all graphs to be generated.
Compared to the plugins bundled with munin, there are a couple of differences in the generated graphs:
- Locks show both "granted" and "waiting" locks. The official plugin did not differentiate between both.
- postgres_transactions_ has not been ported. I have not use-case for that one.
- index scan and sequential scan is removed from tuple access. It is now also related to row access. Both scan fetches are more related to indices and pollute that graph.
- Buffer Cache has been removed and replaced by sepearate I/O plugins for Tables, Sequences and Indices.
I have currently no screenshots at hand which are really representative. All I have is some "work in progress" stuff from my laptop. They don't represent the graphs very well.