Giter Club home page Giter Club logo

collectd-pgpool's Introduction

collectd-pgpool

Collectd plugin for obtaining connection metrics from a running PgPool-II instance. Based on the collectd-python.

Installation & Configuration

  • Make sure you have configured pcp.conf on PgPool-II
  • Clone this repo: git clone https://github.com/mirekys/collectd-apachelog.git
  • Place pgpool.py and util.py to your collectd-python ModulePath
  • Update your collectd.conf
  <Plugin python>
        ModulePath "/../../collectd-plugins/"
        LogTraces false
        Interactive false
        Import 'pgpool'
        <Module pgpool>
                Hostname "localhost"
                PcpUser "pcpuser"
                PcpPassword "..."
                PcpPort "9898"
                PcpTimeout 1
        </Module>
</Plugin>

Output

Plugin executes the following PCP command:

pcp_proc_info -v $PCP_TIMEOUT $PCP_HOSTNAME $PCP_PORT $PCP_USER $PCP_PASSWORD

Which results in following output example:

pgpool/count-pools=6
pgpool/count-connections_per_pool=8
pgpool/count-pools-active=6
pgpool/count-pool0-dbname-dbuser-active_connections=1
pgpool/count-pool0-dbname-dbuser-total_connections=1
pgpool/count-pool1-dbname-dbuser-active_connections=0
pgpool/count-pool1-dbname-dbuser-total_connections=3
pgpool/count-pool2-dbname-dbuser-active_connections=0
pgpool/count-pool2-dbname-dbuser-total_connections=2
pgpool/count-pool3-dbname-dbuser-active_connections=0
pgpool/count-pool3-dbname-dbuser-total_connections=2
pgpool/count-pool4-dbname-dbuser-active_connections=1
pgpool/count-pool4-dbname-dbuser-total_connections=4
pgpool/count-pool5-dbname-dbuser-active_connections=1
pgpool/count-pool5-dbname-dbuser-total_connections=4

Debugging

You can run this plugin in standalone debug mode, where it outputs to console what would be otherwise sent to the collectd daemon:

./pgpool.py debug

collectd-pgpool's People

Contributors

mirekys avatar

Watchers

 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.