From 2e85f9325a797977eea9dfea0a925775ddd211d9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Feb 2021 12:49:00 +0100 Subject: Merging upstream version 1.29.0. Signed-off-by: Daniel Baumann --- collectors/charts.d.plugin/phpfpm/Makefile.inc | 13 -- collectors/charts.d.plugin/phpfpm/README.md | 6 - collectors/charts.d.plugin/phpfpm/phpfpm.chart.sh | 169 ---------------------- collectors/charts.d.plugin/phpfpm/phpfpm.conf | 27 ---- 4 files changed, 215 deletions(-) delete mode 100644 collectors/charts.d.plugin/phpfpm/Makefile.inc delete mode 100644 collectors/charts.d.plugin/phpfpm/README.md delete mode 100644 collectors/charts.d.plugin/phpfpm/phpfpm.chart.sh delete mode 100644 collectors/charts.d.plugin/phpfpm/phpfpm.conf (limited to 'collectors/charts.d.plugin/phpfpm') diff --git a/collectors/charts.d.plugin/phpfpm/Makefile.inc b/collectors/charts.d.plugin/phpfpm/Makefile.inc deleted file mode 100644 index 56bff6102..000000000 --- a/collectors/charts.d.plugin/phpfpm/Makefile.inc +++ /dev/null @@ -1,13 +0,0 @@ -# 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_charts_DATA += phpfpm/phpfpm.chart.sh -dist_chartsconfig_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/charts.d.plugin/phpfpm/README.md b/collectors/charts.d.plugin/phpfpm/README.md deleted file mode 100644 index f8976301b..000000000 --- a/collectors/charts.d.plugin/phpfpm/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# phpfm - -> THIS MODULE IS OBSOLETE. -> USE [THE PYTHON ONE](../../python.d.plugin/phpfpm) - IT SUPPORTS MULTIPLE JOBS AND IT IS MORE EFFICIENT - -[![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fcollectors%2Fcharts.d.plugin%2Fphpfpm%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>) diff --git a/collectors/charts.d.plugin/phpfpm/phpfpm.chart.sh b/collectors/charts.d.plugin/phpfpm/phpfpm.chart.sh deleted file mode 100644 index b1edb2373..000000000 --- a/collectors/charts.d.plugin/phpfpm/phpfpm.chart.sh +++ /dev/null @@ -1,169 +0,0 @@ -# shellcheck shell=bash -# no need for shebang - this file is loaded from charts.d.plugin -# SPDX-License-Identifier: GPL-3.0-or-later - -# netdata -# real-time performance and health monitoring, done right! -# (C) 2016 Costa Tsaousis -# -# Contributed by @safeie with PR #276 - -# first, you need open php-fpm status in php-fpm.conf -# second, you need add status location in nginx.conf -# you can see, https://easyengine.io/tutorials/php/fpm-status-page/ - -declare -A phpfpm_urls=() -declare -A phpfpm_curl_opts=() - -# _update_every is a special variable - it holds the number of seconds -# between the calls of the _update() function -phpfpm_update_every= -phpfpm_priority=60000 - -declare -a phpfpm_response=() -phpfpm_pool="" -phpfpm_start_time="" -phpfpm_start_since=0 -phpfpm_accepted_conn=0 -phpfpm_listen_queue=0 -phpfpm_max_listen_queue=0 -phpfpm_listen_queue_len=0 -phpfpm_idle_processes=0 -phpfpm_active_processes=0 -phpfpm_total_processes=0 -phpfpm_max_active_processes=0 -phpfpm_max_children_reached=0 -phpfpm_slow_requests=0 -phpfpm_get() { - local opts="${1}" url="${2}" - - # shellcheck disable=SC2207,2086 - phpfpm_response=($(run curl -Ss ${opts} "${url}")) - # shellcheck disable=SC2181 - if [ $? -ne 0 ] || [ "${#phpfpm_response[@]}" -eq 0 ]; then - return 1 - fi - - if [[ ${phpfpm_response[0]} != "pool:" || ${phpfpm_response[2]} != "process" || ${phpfpm_response[5]} != "start" || ${phpfpm_response[12]} != "accepted" || ${phpfpm_response[15]} != "listen" || ${phpfpm_response[16]} != "queue:" || ${phpfpm_response[26]} != "idle" || ${phpfpm_response[29]} != "active" || ${phpfpm_response[32]} != "total" ]]; then - error "invalid response from phpfpm status server: ${phpfpm_response[*]}" - return 1 - fi - - phpfpm_pool="${phpfpm_response[1]}" - phpfpm_start_time="${phpfpm_response[7]} ${phpfpm_response[8]}" - phpfpm_start_since="${phpfpm_response[11]}" - phpfpm_accepted_conn="${phpfpm_response[14]}" - phpfpm_listen_queue="${phpfpm_response[17]}" - phpfpm_max_listen_queue="${phpfpm_response[21]}" - phpfpm_listen_queue_len="${phpfpm_response[25]}" - phpfpm_idle_processes="${phpfpm_response[28]}" - phpfpm_active_processes="${phpfpm_response[31]}" - phpfpm_total_processes="${phpfpm_response[34]}" - phpfpm_max_active_processes="${phpfpm_response[38]}" - phpfpm_max_children_reached="${phpfpm_response[42]}" - if [ "${phpfpm_response[43]}" == "slow" ]; then - phpfpm_slow_requests="${phpfpm_response[45]}" - else - phpfpm_slow_requests="-1" - fi - - if [[ -z ${phpfpm_pool} || -z ${phpfpm_start_time} || -z ${phpfpm_start_since} || -z ${phpfpm_accepted_conn} || -z ${phpfpm_listen_queue} || -z ${phpfpm_max_listen_queue} || -z ${phpfpm_listen_queue_len} || -z ${phpfpm_idle_processes} || -z ${phpfpm_active_processes} || -z ${phpfpm_total_processes} || -z ${phpfpm_max_active_processes} || -z ${phpfpm_max_children_reached} ]]; then - error "empty values got from phpfpm status server: ${phpfpm_response[*]}" - return 1 - fi - - return 0 -} - -# _check is called once, to find out if this chart should be enabled or not -phpfpm_check() { - if [ ${#phpfpm_urls[@]} -eq 0 ]; then - phpfpm_urls[local]="http://localhost/status" - fi - - local m - for m in "${!phpfpm_urls[@]}"; do - phpfpm_get "${phpfpm_curl_opts[$m]}" "${phpfpm_urls[$m]}" - # shellcheck disable=SC2181 - if [ $? -ne 0 ]; then - # shellcheck disable=SC2154 - error "cannot find status on URL '${phpfpm_urls[$m]}'. Please set phpfpm_urls[$m]='http://localhost/status' in $confd/phpfpm.conf" - unset "phpfpm_urls[$m]" - continue - fi - done - - if [ ${#phpfpm_urls[@]} -eq 0 ]; then - error "no phpfpm servers found. Please set phpfpm_urls[name]='url' to whatever needed to get status to the phpfpm server, in $confd/phpfpm.conf" - return 1 - fi - - # this should return: - # - 0 to enable the chart - # - 1 to disable the chart - - return 0 -} - -# _create is called once, to create the charts -phpfpm_create() { - local m - for m in "${!phpfpm_urls[@]}"; do - cat < -# GPL v3+ - -# THIS PLUGIN IS DEPRECATED -# USE THE PYTHON.D ONE - -# first, you need open php-fpm status in php-fpm.conf -# second, you need add status location in nginx.conf -# you can see, https://easyengine.io/tutorials/php/fpm-status-page/ -#phpfpm_urls[name]="" -#phpfpm_curl_opts[name]="" - -# the data collection frequency -# if unset, will inherit the netdata update frequency -#phpfpm_update_every= - -# the charts priority on the dashboard -#phpfpm_priority=60000 - -# the number of retries to do in case of failure -# before disabling the module -#phpfpm_retries=10 - -- cgit v1.2.3