From: Jorge Romero Date: Fri, 6 May 2016 15:10:06 +0000 (-0400) Subject: Adding tomcat username/password to curl command X-Git-Tag: v1.2.0~16^2~4 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e116f7a46d7d868c18c6db0f0c99f1316fd930ef;p=netdata.git Adding tomcat username/password to curl command --- diff --git a/charts.d/tomcat.chart.sh b/charts.d/tomcat.chart.sh index f5a4cb99..2458b984 100755 --- a/charts.d/tomcat.chart.sh +++ b/charts.d/tomcat.chart.sh @@ -6,6 +6,10 @@ # the URL to download tomcat status info tomcat_url="http://localhost:8080/manager/status?XML=true" +# set tomcat user/password here +tomcatUser="" +tomcatPassword="" + # _update_every is a special variable - it holds the number of seconds # between the calls of the _update() function tomcat_update_every= @@ -41,7 +45,7 @@ tomcat_check() { tomcat_get() { # Collect tomcat values - mapfile -t lines < <(curl -Ss "$tomcat_url" |\ + mapfile -t lines < <(curl -u "$tomcatUser":"$tomcatPassword" -Ss "$tomcat_url" |\ xmlstarlet sel \ -t -m "/status/jvm/memory" -v @free \ -n -m "/status/connector[@name='\"http-bio-8080\"']/threadInfo" -v @currentThreadCount \