summaryrefslogtreecommitdiffstats
path: root/collectors/charts.d.plugin/nginx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:30:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-08 07:30:37 +0000
commit8a7b72f7cd1ccd547a03eb4243294e741d661d3f (patch)
tree7bc7be4a8e9e298daa1349348400aa2a653866f2 /collectors/charts.d.plugin/nginx
parentNew upstream version 1.11.1+dfsg (diff)
downloadnetdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.tar.xz
netdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.zip
Adding upstream version 1.12.0.upstream/1.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/charts.d.plugin/nginx')
-rw-r--r--collectors/charts.d.plugin/nginx/README.md6
-rw-r--r--collectors/charts.d.plugin/nginx/nginx.chart.sh37
2 files changed, 22 insertions, 21 deletions
diff --git a/collectors/charts.d.plugin/nginx/README.md b/collectors/charts.d.plugin/nginx/README.md
index d82951aac..42a4f812b 100644
--- a/collectors/charts.d.plugin/nginx/README.md
+++ b/collectors/charts.d.plugin/nginx/README.md
@@ -1,2 +1,6 @@
+# nginx
+
> THIS MODULE IS OBSOLETE.
-> USE THE PYTHON ONE - IT SUPPORTS MULTIPLE JOBS AND IT IS MORE EFFICIENT
+> USE [THE PYTHON ONE](../../python.d.plugin/nginx) - 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%2Fnginx%2FREADME&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)]()
diff --git a/collectors/charts.d.plugin/nginx/nginx.chart.sh b/collectors/charts.d.plugin/nginx/nginx.chart.sh
index 14dda0832..812de2cbb 100644
--- a/collectors/charts.d.plugin/nginx/nginx.chart.sh
+++ b/collectors/charts.d.plugin/nginx/nginx.chart.sh
@@ -32,16 +32,15 @@ nginx_get() {
# shellcheck disable=SC2181
if [ $? -ne 0 ] || [ "${#nginx_response[@]}" -eq 0 ]; then return 1; fi
- if [ "${nginx_response[0]}" != "Active" ] ||\
- [ "${nginx_response[1]}" != "connections:" ] ||\
- [ "${nginx_response[3]}" != "server" ] ||\
- [ "${nginx_response[4]}" != "accepts" ] ||\
- [ "${nginx_response[5]}" != "handled" ] ||\
- [ "${nginx_response[6]}" != "requests" ] ||\
- [ "${nginx_response[10]}" != "Reading:" ] ||\
- [ "${nginx_response[12]}" != "Writing:" ] ||\
- [ "${nginx_response[14]}" != "Waiting:" ]
- then
+ if [ "${nginx_response[0]}" != "Active" ] ||
+ [ "${nginx_response[1]}" != "connections:" ] ||
+ [ "${nginx_response[3]}" != "server" ] ||
+ [ "${nginx_response[4]}" != "accepts" ] ||
+ [ "${nginx_response[5]}" != "handled" ] ||
+ [ "${nginx_response[6]}" != "requests" ] ||
+ [ "${nginx_response[10]}" != "Reading:" ] ||
+ [ "${nginx_response[12]}" != "Writing:" ] ||
+ [ "${nginx_response[14]}" != "Waiting:" ]; then
error "Invalid response from nginx server: ${nginx_response[*]}"
return 1
fi
@@ -54,14 +53,13 @@ nginx_get() {
nginx_writing="${nginx_response[13]}"
nginx_waiting="${nginx_response[15]}"
- if [ -z "${nginx_active_connections}" ] ||\
- [ -z "${nginx_accepts}" ] ||\
- [ -z "${nginx_handled}" ] ||\
- [ -z "${nginx_requests}" ] ||\
- [ -z "${nginx_reading}" ] ||\
- [ -z "${nginx_writing}" ] ||\
- [ -z "${nginx_waiting}" ]
- then
+ if [ -z "${nginx_active_connections}" ] ||
+ [ -z "${nginx_accepts}" ] ||
+ [ -z "${nginx_handled}" ] ||
+ [ -z "${nginx_requests}" ] ||
+ [ -z "${nginx_reading}" ] ||
+ [ -z "${nginx_writing}" ] ||
+ [ -z "${nginx_waiting}" ]; then
error "empty values got from nginx server: ${nginx_response[*]}"
return 1
fi
@@ -74,8 +72,7 @@ nginx_check() {
nginx_get
# shellcheck disable=2181
- if [ $? -ne 0 ]
- then
+ if [ $? -ne 0 ]; then
# shellcheck disable=SC2154
error "cannot find stub_status on URL '${nginx_url}'. Please set nginx_url='http://nginx.server/stub_status' in $confd/nginx.conf"
return 1