From 17053582ff88c91b5692e7a54ec85ee6973b86d9 Mon Sep 17 00:00:00 2001 From: "Costa Tsaousis (ktsaou)" Date: Mon, 23 May 2016 20:23:57 +0300 Subject: support custom curl options in charts.d plugins --- charts.d/tomcat.chart.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'charts.d/tomcat.chart.sh') diff --git a/charts.d/tomcat.chart.sh b/charts.d/tomcat.chart.sh index f7809ddd31..b0eddc7f0d 100755 --- a/charts.d/tomcat.chart.sh +++ b/charts.d/tomcat.chart.sh @@ -6,6 +6,7 @@ # the URL to download tomcat status info # usually http://localhost:8080/manager/status?XML=true tomcat_url="" +tomcat_curl_opts="" # set tomcat username/password here tomcatUser="" @@ -64,7 +65,7 @@ tomcat_check() { tomcat_get() { # collect tomcat values tomcat_port="$(IFS=/ read -ra a <<< "$tomcat_url"; hostport=${a[2]}; echo "${hostport#*:}")" - mapfile -t lines < <(curl -u "$tomcatUser":"$tomcatPassword" -Ss "$tomcat_url" |\ + mapfile -t lines < <(curl -u "$tomcatUser":"$tomcatPassword" -Ss ${tomcat_curl_opts} "$tomcat_url" |\ xmlstarlet sel \ -t -m "/status/jvm/memory" -v @free \ -n -m "/status/connector[@name='\"http-bio-$tomcat_port\"']/threadInfo" -v @currentThreadCount \ -- cgit v1.2.3