Giter VIP home page Giter VIP logo

collectd-python-php-fpm-status's Introduction

collectd-python-php-fpm-status

PHP-FPM status monitor plugin for collectd, written in python

QUICK START

This plugin can be used in standalone, simply run it and pass a valid PHP-FPM status page url to it:

$ ./phpfpm.py http://localhost/status?json&full

INSTALLATION

  1. First edit the fpm pool configuration to enable the status page, for example in Debian/Ubuntu: /etc/php/7.1/fpm/pool.d/my_pool.conf
  2. Place phpfpm.py in your CollectD python plugins directory, for example /usr/local/lib/collectd/python/
  3. Configure the plugin in CollectD (see below)
  4. Restart CollectD

COLLECTD CONFIGURATION

Edit your /etc/collectd/collectd.conf file, it should look like this:

LoadPlugin python
<Plugin python>
    ModulePath "/usr/local/lib/collectd/python"
    Import "phpfpm"
    <Module phpfpm>
            Url "http://127.0.0.2/pool_1_status?json&full"
    </Module>
    <Module phpfpm>
            Url "http://127.0.0.2/pool_2_status?json&full"
    </Module>
    <Module phpfpm>
            Url "http://127.0.0.2/pool_N_status?json&full"
    </Module>
</Plugin>

You can add as many Module instances as you whish, each one pointing to a different server url. Don't forget to add the ?json&full query params, they are essential for this plugin to work.

DATA FORMAT

The data is collected using the format:

phpfpm.pool-gauge-metric for the master process, and phpfpm.pool-process-N.gauge-metric for each child process

Enjoy!

collectd-python-php-fpm-status's People

Contributors

denjohx avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bato3 krokwen

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.