Skip to content
/ pgsampler Public

Experimental Postgresql background worker for collecting status and performance metrics

License

Notifications You must be signed in to change notification settings

no0p/pgsampler

Repository files navigation

Introduction

Pgsampler is an experimental background worker for collecting statistics about a Postgresql cluster's state and activity.

The project home page provides a demo and high level introduction.

The project wiki contains more detailed documentation.

The timeseries data can be logged to CSV files for later analysis, or shipped over a network connection to a receiving service for monitoring and analysis.

Installation

git clone git@github.com:no0p/pgsampler.git
cd pgsampler
make
sudo make install

Next update the postgresql.conf directive shared_preload_libraries to include pgsampler, like to the following example:

shared_preload_libraries = 'pgsampler'

Finally, restart the postgresql server.

Dependencies

Ensure that the postgresql development packages are installed to build.

For an ubuntu system the following will suffice:

sudo apt-get install postgresql-9.3-dev

Uninstalling

It's easy to effectively uninstall pgsampler for any reason. If any issues arise and you want to rule out pgsampler, simply remove 'pgsampler' from the shared_preload_libraries directive and restart the server.

Safety Considerations

Pgsampler does not write to or update any tables -- it only reads data from the database. It only receives a fixed a length acknowledgement for data sent over the network.

Still, it is a background worker with access to shared memory and has access to all databases. At this time it is only recommended for more casual clusters until additional development and testing are completed.

About

Experimental Postgresql background worker for collecting status and performance metrics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published