diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-05-23 20:23:57 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-05-23 20:23:57 +0300 |
commit | 17053582ff88c91b5692e7a54ec85ee6973b86d9 (patch) | |
tree | 2d2c00568a53bfd1f10b42dd10e6458c58d8cb4d /charts.d/nginx.chart.sh | |
parent | eb35d9fb315b26850c27643e8e6bf8dadb3dae6e (diff) |
support custom curl options in charts.d plugins
Diffstat (limited to 'charts.d/nginx.chart.sh')
-rwxr-xr-x | charts.d/nginx.chart.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/charts.d/nginx.chart.sh b/charts.d/nginx.chart.sh index 450aa94b30..9b75c2c5e6 100755 --- a/charts.d/nginx.chart.sh +++ b/charts.d/nginx.chart.sh @@ -4,6 +4,7 @@ # must start with X_ nginx_url="http://127.0.0.1:80/stub_status" +nginx_curl_opts="" # _update_every is a special variable - it holds the number of seconds # between the calls of the _update() function @@ -19,7 +20,7 @@ nginx_reading=0 nginx_writing=0 nginx_waiting=0 nginx_get() { - nginx_response=($(curl -Ss "${nginx_url}")) + nginx_response=($(curl -Ss ${nginx_curl_opts} "${nginx_url}")) [ $? -ne 0 -o "${#nginx_response[@]}" -eq 0 ] && return 1 if [ "${nginx_response[0]}" != "Active" \ |