From 61aedf201c2c4bf0e5aa4db32e74f4d860b88593 Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Tue, 19 Dec 2017 23:39:21 +0000 Subject: New upstream version 1.9.0+dfsg --- charts.d/apache.chart.sh | 4 ++-- charts.d/cpufreq.chart.sh | 2 +- charts.d/example.chart.sh | 2 +- charts.d/hddtemp.chart.sh | 4 ++-- charts.d/nginx.chart.sh | 2 +- charts.d/phpfpm.chart.sh | 16 ++++++++-------- charts.d/sensors.chart.sh | 2 +- charts.d/tomcat.chart.sh | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) (limited to 'charts.d') diff --git a/charts.d/apache.chart.sh b/charts.d/apache.chart.sh index b503e74e3..a8ac08014 100644 --- a/charts.d/apache.chart.sh +++ b/charts.d/apache.chart.sh @@ -114,7 +114,7 @@ apache_get() { apache_accesses="${apache_response[${apache_key_accesses}]}" apache_kbytes="${apache_response[${apache_key_kbytes}]}" - + float2int "${apache_response[${apache_key_reqpersec}]}" ${apache_decimal_detail} apache_reqpersec=${FLOAT2INT_RESULT} @@ -201,7 +201,7 @@ EOF2 return 0 } -# _update is called continiously, to collect the values +# _update is called continuously, to collect the values apache_update() { local reqs net # the first argument to this function is the microseconds since last update diff --git a/charts.d/cpufreq.chart.sh b/charts.d/cpufreq.chart.sh index b21504a0e..1c41c38f2 100644 --- a/charts.d/cpufreq.chart.sh +++ b/charts.d/cpufreq.chart.sh @@ -72,7 +72,7 @@ cpufreq_create() { return 0 } -# _update is called continiously, to collect the values +# _update is called continuously, to collect the values cpufreq_update() { # the first argument to this function is the microseconds since last update # pass this parameter to the BEGIN statement (see bellow). diff --git a/charts.d/example.chart.sh b/charts.d/example.chart.sh index 86fde4901..ffc98712f 100644 --- a/charts.d/example.chart.sh +++ b/charts.d/example.chart.sh @@ -96,7 +96,7 @@ EOF return 0 } -# _update is called continiously, to collect the values +# _update is called continuously, to collect the values example_update() { # the first argument to this function is the microseconds since last update # pass this parameter to the BEGIN statement (see bellow). diff --git a/charts.d/hddtemp.chart.sh b/charts.d/hddtemp.chart.sh index 15895c5e1..3aada1751 100644 --- a/charts.d/hddtemp.chart.sh +++ b/charts.d/hddtemp.chart.sh @@ -43,7 +43,7 @@ hddtemp_create() { return 0 } -# _update is called continiously, to collect the values +# _update is called continuously, to collect the values hddtemp_last=0 hddtemp_count=0 hddtemp_update() { @@ -56,7 +56,7 @@ hddtemp_update() { IFS=$OLD_IFS # check if there is some data - if [ -z "${all[3]}" ]; then + if [ -z "${all[3]}" ]; then return 1 fi diff --git a/charts.d/nginx.chart.sh b/charts.d/nginx.chart.sh index 0ae7d6307..d0df460ac 100644 --- a/charts.d/nginx.chart.sh +++ b/charts.d/nginx.chart.sh @@ -107,7 +107,7 @@ EOF return 0 } -# _update is called continiously, to collect the values +# _update is called continuously, to collect the values nginx_update() { # the first argument to this function is the microseconds since last update # pass this parameter to the BEGIN statement (see bellow). diff --git a/charts.d/phpfpm.chart.sh b/charts.d/phpfpm.chart.sh index a5ee0ad56..a3c69b6f0 100644 --- a/charts.d/phpfpm.chart.sh +++ b/charts.d/phpfpm.chart.sh @@ -72,7 +72,7 @@ phpfpm_get() { else phpfpm_slow_requests="-1" fi - + if [[ -z "${phpfpm_pool}" \ || -z "${phpfpm_start_time}" \ || -z "${phpfpm_start_since}" \ @@ -99,7 +99,7 @@ phpfpm_check() { if [ ${#phpfpm_urls[@]} -eq 0 ]; then phpfpm_urls[local]="http://localhost/status" fi - + local m for m in "${!phpfpm_urls[@]}" do @@ -110,12 +110,12 @@ phpfpm_check() { 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 @@ -145,11 +145,11 @@ EOF echo "DIMENSION slow 'slow requests' absolute 1 1" fi done - + return 0 } -# _update is called continiously, to collect the values +# _update is called continuously, to collect the values phpfpm_update() { # the first argument to this function is the microseconds since last update # pass this parameter to the BEGIN statement (see bellow). @@ -165,7 +165,7 @@ phpfpm_update() { if [ $? -ne 0 ]; then continue fi - + # write the result of the work. cat <