Giter VIP home page Giter VIP logo

munin_pgpool's Introduction

munin_pgpool

A Munin-plugin for pgpool-II written by Viktor Petersson.

The plugin plots three values:

  • Wait for connection
  • Idle connections
  • num_init_children

Configuration

In order to authenticate to pgpool, we need to provide the credentials for pcp_pool_status in plugins.conf: If env.pcppath is not specified, the plugin executes /usr/bin/pcp_pool_path.

[pgpool_*]
env.host  MyDBServer
env.port  9898
env.user  pooladm
env.userpwd  foobar123
env.pcppath  /path/to/pcp_pool_status
env.pid_file /var/run/pgpool/pgpool.pid 

Requirements

There are two requirements for this plugin to work.

The first one is the Python library 'psutil'.

This can be easily installed using: pip install psutil

... or if you prefer easy_install: easy_install psutil

The second requirement is pcp_pool_status, which is part of pgpool-II. This is used to access information about the pool. It should also be said that this plugin must run on the server running pgpool since we look for processes (see below).

How the values are derived

num_init_children

This value is simply retreived from pcp_pool_status.

Wait for connection

This one is a bit more tricky. What the plugin does is to simply look for processes named "wait for connection request" (with some filtering).

We then just count the number of occurrences and plot the value.

Idle connections

This works just as the above plugin, but we look for the string "idle in transaction".

Access rights to PID file

Note that you should give a+r access rights to pgpool PID file

chmod a+r /var/run/pgpool/pgpool.pid

munin_pgpool's People

Contributors

vpetersson avatar azumakuniyuki avatar mangust404 avatar

Stargazers

steve avatar

Watchers

Will Thames avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.