mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* checkpoint work for now * polling should be good now * re-work php-fpm some more * re-work the php-fpm app page * add php-fpm_v1_combined.inc.php * add more graphs * more work * add last request cpu * fix stats for pools * more graph work * update the docs for php-fpm * more graph work * more graph stuff * graph stuff now done * some style fixes * another style fix * remove a unneeded use line * add new tests * add some missing items to the test * json fix * remove start time and add data
40 lines
1.1 KiB
PHP
40 lines
1.1 KiB
PHP
<?php
|
|
|
|
$name = 'php-fpm';
|
|
$unit_text = 'Totals';
|
|
$colours = 'psychedelic';
|
|
$dostack = 0;
|
|
$printtotal = 0;
|
|
$descr_len = 20;
|
|
$addarea = 1;
|
|
$transparency = 15;
|
|
|
|
$rrd_list = [];
|
|
|
|
$proc_stats = [
|
|
'max_active_processes' => 'Max Active Processes',
|
|
'active_processes' => 'Active Processes',
|
|
'idle_processes' => 'Idle Processes',
|
|
'max_listen_queue' => 'Max Listen Queue',
|
|
'listen_queue' => 'Listen Queue',
|
|
'listen_queue_len' => 'Listen Queue Len',
|
|
'listen_queue' => 'Listen Queue',
|
|
];
|
|
|
|
foreach ($proc_stats as $stat => $descr) {
|
|
if (isset($vars['phpfpm_pool'])) {
|
|
$filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, 'pools___' . $vars['phpfpm_pool'] . '___' . $stat]);
|
|
} else {
|
|
$filename = Rrd::name($device['hostname'], ['app', $name, $app->app_id, 'totals___' . $stat]);
|
|
}
|
|
if (Rrd::checkRrdExists($filename)) {
|
|
$rrd_list[] = [
|
|
'filename' => $filename,
|
|
'descr' => $descr,
|
|
'ds' => 'data',
|
|
];
|
|
}
|
|
}
|
|
|
|
require 'includes/html/graphs/generic_multi_line.inc.php';
|