summaryrefslogtreecommitdiffstats
path: root/charts.d/tomcat.chart.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-04-21 02:03:59 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2016-04-21 02:03:59 +0300
commitdb16450bd8ef9e93cd557d75e92cba5a87c1fb73 (patch)
treed2166b2f8b019be72b928d69909e37c922442cfd /charts.d/tomcat.chart.sh
parent37cb08efe88d63174877ebaa1868298e862caafd (diff)
added option -Ss to curl so that errors are logged
Diffstat (limited to 'charts.d/tomcat.chart.sh')
-rwxr-xr-xcharts.d/tomcat.chart.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/charts.d/tomcat.chart.sh b/charts.d/tomcat.chart.sh
index 55476f425e..5ca85e8cf7 100755
--- a/charts.d/tomcat.chart.sh
+++ b/charts.d/tomcat.chart.sh
@@ -41,7 +41,13 @@ tomcat_check() {
tomcat_get() {
# Collect tomcat values
- mapfile -t lines < <(curl -s "$tomcat_url" | xmlstarlet sel -t -m "/status/jvm/memory" -v @free -n -m "/status/connector[@name='\"http-bio-8080\"']/threadInfo" -v @currentThreadCount -n -v @currentThreadsBusy -n -m "/status/connector[@name='\"http-bio-8080\"']/requestInfo" -v @requestCount -n -v @bytesSent -n -)
+ mapfile -t lines < <(curl -Ss "$tomcat_url" |\
+ xmlstarlet sel \
+ -t -m "/status/jvm/memory" -v @free \
+ -n -m "/status/connector[@name='\"http-bio-8080\"']/threadInfo" -v @currentThreadCount \
+ -n -v @currentThreadsBusy \
+ -n -m "/status/connector[@name='\"http-bio-8080\"']/requestInfo" -v @requestCount \
+ -n -v @bytesSent -n -)
tomcat_jvm_freememory="${lines[0]}"
tomcat_threads="${lines[1]}"