summaryrefslogtreecommitdiffstats
path: root/charts.d/apache.chart.sh
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2016-05-25 10:36:27 +0000
committerLennart Weller <lhw@ring0.de>2016-05-25 10:36:27 +0000
commit39ecaf8d995e3fefea54f260b8b42bbb9cc806d6 (patch)
tree02ecee3bf4d7dad9dfad2e1799616716f5ffbf03 /charts.d/apache.chart.sh
parentbroken logrotate (diff)
parentImported Upstream version 1.2.0 (diff)
downloadnetdata-39ecaf8d995e3fefea54f260b8b42bbb9cc806d6.tar.xz
netdata-39ecaf8d995e3fefea54f260b8b42bbb9cc806d6.zip
Merge tag 'upstream/1.2.0'
Upstream version 1.2.0
Diffstat (limited to 'charts.d/apache.chart.sh')
-rwxr-xr-xcharts.d/apache.chart.sh68
1 files changed, 34 insertions, 34 deletions
diff --git a/charts.d/apache.chart.sh b/charts.d/apache.chart.sh
index 9b6d53b5..dbf14a43 100755
--- a/charts.d/apache.chart.sh
+++ b/charts.d/apache.chart.sh
@@ -47,21 +47,21 @@ apache_detect() {
for x in "${@}"
do
case "${x}" in
- 'Total Accesses') apache_key_accesses=$[i + 1] ;;
- 'Total kBytes') apache_key_kbytes=$[i + 1] ;;
- 'ReqPerSec') apache_key_reqpersec=$[i + 1] ;;
- 'BytesPerSec') apache_key_bytespersec=$[i + 1] ;;
- 'BytesPerReq') apache_key_bytesperreq=$[i + 1] ;;
- 'BusyWorkers') apache_key_busyworkers=$[i + 1] ;;
- 'IdleWorkers') apache_key_idleworkers=$[i + 1];;
- 'ConnsTotal') apache_key_connstotal=$[i + 1] ;;
- 'ConnsAsyncWriting') apache_key_connsasyncwriting=$[i + 1] ;;
- 'ConnsAsyncKeepAlive') apache_key_connsasynckeepalive=$[i + 1] ;;
- 'ConnsAsyncClosing') apache_key_connsasyncclosing=$[i + 1] ;;
- 'Scoreboard') apache_key_scoreboard=$[i] ;;
+ 'Total Accesses') apache_key_accesses=$((i + 1)) ;;
+ 'Total kBytes') apache_key_kbytes=$((i + 1)) ;;
+ 'ReqPerSec') apache_key_reqpersec=$((i + 1)) ;;
+ 'BytesPerSec') apache_key_bytespersec=$((i + 1)) ;;
+ 'BytesPerReq') apache_key_bytesperreq=$((i + 1)) ;;
+ 'BusyWorkers') apache_key_busyworkers=$((i + 1)) ;;
+ 'IdleWorkers') apache_key_idleworkers=$((i + 1));;
+ 'ConnsTotal') apache_key_connstotal=$((i + 1)) ;;
+ 'ConnsAsyncWriting') apache_key_connsasyncwriting=$((i + 1)) ;;
+ 'ConnsAsyncKeepAlive') apache_key_connsasynckeepalive=$((i + 1)) ;;
+ 'ConnsAsyncClosing') apache_key_connsasyncclosing=$((i + 1)) ;;
+ 'Scoreboard') apache_key_scoreboard=$((i)) ;;
esac
- i=$[i + 1]
+ i=$((i + 1))
done
# we will not check of the Conns*
@@ -94,7 +94,7 @@ apache_detect() {
apache_get() {
local oIFS="${IFS}" ret
- IFS=$':\n' apache_response=($(curl -s "${apache_url}"))
+ IFS=$':\n' apache_response=($(curl -Ss "${apache_url}"))
ret=$?
IFS="${oIFS}"
@@ -167,27 +167,27 @@ apache_check() {
# _create is called once, to create the charts
apache_create() {
cat <<EOF
-CHART apache.bytesperreq '' "apache Lifetime Avg. Response Size" "bytes/request" statistics apache.bytesperreq area $[apache_priority + 8] $apache_update_every
+CHART apache.bytesperreq '' "apache Lifetime Avg. Response Size" "bytes/request" statistics apache.bytesperreq area $((apache_priority + 8)) $apache_update_every
DIMENSION size '' absolute 1 ${apache_decimal_detail}
-CHART apache.workers '' "apache Workers" "workers" workers apache.workers stacked $[apache_priority + 5] $apache_update_every
+CHART apache.workers '' "apache Workers" "workers" workers apache.workers stacked $((apache_priority + 5)) $apache_update_every
DIMENSION idle '' absolute 1 1
DIMENSION busy '' absolute 1 1
-CHART apache.reqpersec '' "apache Lifetime Avg. Requests/s" "requests/s" statistics apache.reqpersec line $[apache_priority + 6] $apache_update_every
+CHART apache.reqpersec '' "apache Lifetime Avg. Requests/s" "requests/s" statistics apache.reqpersec line $((apache_priority + 6)) $apache_update_every
DIMENSION requests '' absolute 1 ${apache_decimal_detail}
-CHART apache.bytespersec '' "apache Lifetime Avg. Bandwidth/s" "kilobits/s" statistics apache.bytespersec area $[apache_priority + 7] $apache_update_every
-DIMENSION sent '' absolute 8 $[apache_decimal_detail * 1000]
-CHART apache.requests '' "apache Requests" "requests/s" requests apache.requests line $[apache_priority + 1] $apache_update_every
+CHART apache.bytespersec '' "apache Lifetime Avg. Bandwidth/s" "kilobits/s" statistics apache.bytespersec area $((apache_priority + 7)) $apache_update_every
+DIMENSION sent '' absolute 8 $((apache_decimal_detail * 1000))
+CHART apache.requests '' "apache Requests" "requests/s" requests apache.requests line $((apache_priority + 1)) $apache_update_every
DIMENSION requests '' incremental 1 1
-CHART apache.net '' "apache Bandwidth" "kilobits/s" bandwidth apache.net area $[apache_priority + 3] $apache_update_every
+CHART apache.net '' "apache Bandwidth" "kilobits/s" bandwidth apache.net area $((apache_priority + 3)) $apache_update_every
DIMENSION sent '' incremental 8 1
EOF
if [ ${apache_has_conns} -eq 1 ]
then
cat <<EOF2
-CHART apache.connections '' "apache Connections" "connections" connections apache.connections line $[apache_priority + 2] $apache_update_every
+CHART apache.connections '' "apache Connections" "connections" connections apache.connections line $((apache_priority + 2)) $apache_update_every
DIMENSION connections '' absolute 1 1
-CHART apache.conns_async '' "apache Async Connections" "connections" connections apache.conns_async stacked $[apache_priority + 4] $apache_update_every
+CHART apache.conns_async '' "apache Async Connections" "connections" connections apache.conns_async stacked $((apache_priority + 4)) $apache_update_every
DIMENSION keepalive '' absolute 1 1
DIMENSION closing '' absolute 1 1
DIMENSION writing '' absolute 1 1
@@ -212,23 +212,23 @@ apache_update() {
# write the result of the work.
cat <<VALUESEOF
BEGIN apache.requests $1
-SET requests = $[apache_accesses]
+SET requests = $((apache_accesses))
END
BEGIN apache.net $1
-SET sent = $[apache_kbytes]
+SET sent = $((apache_kbytes))
END
BEGIN apache.reqpersec $1
-SET requests = $[apache_reqpersec]
+SET requests = $((apache_reqpersec))
END
BEGIN apache.bytespersec $1
-SET sent = $[apache_bytespersec]
+SET sent = $((apache_bytespersec))
END
BEGIN apache.bytesperreq $1
-SET size = $[apache_bytesperreq]
+SET size = $((apache_bytesperreq))
END
BEGIN apache.workers $1
-SET idle = $[apache_idleworkers]
-SET busy = $[apache_busyworkers]
+SET idle = $((apache_idleworkers))
+SET busy = $((apache_busyworkers))
END
VALUESEOF
@@ -236,12 +236,12 @@ VALUESEOF
then
cat <<VALUESEOF2
BEGIN apache.connections $1
-SET connections = $[apache_connstotal]
+SET connections = $((apache_connstotal))
END
BEGIN apache.conns_async $1
-SET keepalive = $[apache_connsasynckeepalive]
-SET closing = $[apache_connsasyncwriting]
-SET writing = $[apache_connsasyncwriting]
+SET keepalive = $((apache_connsasynckeepalive))
+SET closing = $((apache_connsasyncwriting))
+SET writing = $((apache_connsasyncwriting))
END
VALUESEOF2
fi