]> arthur.barton.de Git - netdata.git/blobdiff - charts.d/tomcat.chart.sh
Merge pull request #537 from ktsaou/master
[netdata.git] / charts.d / tomcat.chart.sh
index f7809ddd3109a333d1127957735d770670c915b3..b0eddc7f0dac66345b79ad55b017a321b53ae5ac 100755 (executable)
@@ -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 \