Code Monkey home page Code Monkey logo

php-fpm-munin-plugins's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

php-fpm-munin-plugins's Issues

Feature request: show more data (e.g. slow requests,

php-fpm status is showing much more information nowadays:

pool: www
process manager: dynamic
start time: 16/Feb/2017:13:57:15 +0100
start since: 354978
accepted conn: 449998
listen queue: 0
max listen queue: 0
listen queue len: 0
idle processes: 5
active processes: 1
total processes: 6
max active processes: 9
max children reached: 0
slow requests: 0

Is it possible to add more of those to the munin plugin?
a value of accepted conn divided by start since would also be interesting (=connections per second).

Support multiple PHP-FPM pools

It's quite easy to make the script run with multiple PHP-FPM pools that have different /status URLs.

  1. Copy phpfpm_check to (for example) phpfpm_check.primary
  2. Add three lines below the definition of $my
/* default config */
$my = array(
    'url' => getenv('url') ? getenv('url') : 'http://127.0.0.1:80/status.primary?json',
    'fpmbin' => getenv('fpmbin') ? getenv('fpmbin') : 'php-fpm',
    'self' => basename($argv[0]),
);

/* Remove pool appendix */
if (($p = strpos($my['self'], '.')) !== false) {
  $my['self'] = substr($my['self'], 0, $p);
}

This will strip anything after a point (.) in the filename. This allows to create different symbol links calling the same methods:

ln -s /usr/share/munin/plugins/php-fpm-munin-plugins/phpfpm_check.primary /etc/munin/plugins/phpfpm_average.primary
ln -s /usr/share/munin/plugins/php-fpm-munin-plugins/phpfpm_check.secondary /etc/munin/plugins/phpfpm_average.secondary

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.