diff options
Diffstat (limited to '')
-rw-r--r-- | collectors/python.d.plugin/phpfpm/Makefile.inc | 13 | ||||
-rw-r--r-- | collectors/python.d.plugin/phpfpm/README.md | 40 | ||||
-rw-r--r-- | collectors/python.d.plugin/phpfpm/phpfpm.chart.py (renamed from python.d/phpfpm.chart.py) | 20 | ||||
-rw-r--r-- | collectors/python.d.plugin/phpfpm/phpfpm.conf (renamed from conf.d/python.d/phpfpm.conf) | 2 |
4 files changed, 68 insertions, 7 deletions
diff --git a/collectors/python.d.plugin/phpfpm/Makefile.inc b/collectors/python.d.plugin/phpfpm/Makefile.inc new file mode 100644 index 000000000..ff312fe18 --- /dev/null +++ b/collectors/python.d.plugin/phpfpm/Makefile.inc @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +# THIS IS NOT A COMPLETE Makefile +# IT IS INCLUDED BY ITS PARENT'S Makefile.am +# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT + +# install these files +dist_python_DATA += phpfpm/phpfpm.chart.py +dist_pythonconfig_DATA += phpfpm/phpfpm.conf + +# do not install these files, but include them in the distribution +dist_noinst_DATA += phpfpm/README.md phpfpm/Makefile.inc + diff --git a/collectors/python.d.plugin/phpfpm/README.md b/collectors/python.d.plugin/phpfpm/README.md new file mode 100644 index 000000000..66930463f --- /dev/null +++ b/collectors/python.d.plugin/phpfpm/README.md @@ -0,0 +1,40 @@ +# phpfpm + +This module will monitor one or more php-fpm instances depending on configuration. + +**Requirements:** + * php-fpm with enabled `status` page + * access to `status` page via web server + +It produces following charts: + +1. **Active Connections** + * active + * maxActive + * idle + +2. **Requests** in requests/s + * requests + +3. **Performance** + * reached + * slow + +### configuration + +Needs only `url` to server's `status` + +Here is an example for local instance: + +```yaml +update_every : 3 +priority : 90100 + +local: + url : 'http://localhost/status' + retries : 10 +``` + +Without configuration, module attempts to connect to `http://localhost/status` + +--- diff --git a/python.d/phpfpm.chart.py b/collectors/python.d.plugin/phpfpm/phpfpm.chart.py index ea7a9a7e6..a3f0963fc 100644 --- a/python.d/phpfpm.chart.py +++ b/collectors/python.d.plugin/phpfpm/phpfpm.chart.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- # Description: PHP-FPM netdata python.d module # Author: Pawel Krupa (paulfantom) +# Author: Ilya Mashchenko (l2isbad) +# SPDX-License-Identifier: GPL-3.0-or-later import json import re @@ -58,18 +60,21 @@ CHARTS = { ['active'], ['maxActive', 'max active'], ['idle'] - ]}, + ] + }, 'requests': { 'options': [None, 'PHP-FPM Requests', 'requests/s', 'requests', 'phpfpm.requests', 'line'], 'lines': [ ['requests', None, 'incremental'] - ]}, + ] + }, 'performance': { 'options': [None, 'PHP-FPM Performance', 'status', 'performance', 'phpfpm.performance', 'line'], 'lines': [ ['reached', 'max children reached'], ['slow', 'slow requests'] - ]}, + ] + }, 'request_duration': { 'options': [None, 'PHP-FPM Request Duration', 'milliseconds', 'request duration', 'phpfpm.request_duration', 'line'], @@ -77,21 +82,24 @@ CHARTS = { ['minReqDur', 'min', 'absolute', 1, 1000], ['maxReqDur', 'max', 'absolute', 1, 1000], ['avgReqDur', 'avg', 'absolute', 1, 1000] - ]}, + ] + }, 'request_cpu': { 'options': [None, 'PHP-FPM Request CPU', 'percent', 'request CPU', 'phpfpm.request_cpu', 'line'], 'lines': [ ['minReqCpu', 'min'], ['maxReqCpu', 'max'], ['avgReqCpu', 'avg'] - ]}, + ] + }, 'request_mem': { 'options': [None, 'PHP-FPM Request Memory', 'kilobytes', 'request memory', 'phpfpm.request_mem', 'line'], 'lines': [ ['minReqMem', 'min', 'absolute', 1, 1024], ['maxReqMem', 'max', 'absolute', 1, 1024], ['avgReqMem', 'avg', 'absolute', 1, 1024] - ]} + ] + } } diff --git a/conf.d/python.d/phpfpm.conf b/collectors/python.d.plugin/phpfpm/phpfpm.conf index 08688e2fa..571eb9156 100644 --- a/conf.d/python.d/phpfpm.conf +++ b/collectors/python.d.plugin/phpfpm/phpfpm.conf @@ -86,5 +86,5 @@ localipv4: localipv6: name : 'local' - url : "http://::1/status?full&json" + url : "http://[::1]/status?full&json" |