@cryptotaxi247 / netdata-1 / commits / db16450bd

added option -Ss to curl so that errors are logged

Costa Tsaousis (ktsaou) committed Apr 21, 2016 at 02:03 UTC db16450bd8ef9e93cd557d75e92cba5a87c1fb73
4 files changed +10 -4
charts.d/apache.chart.sh
+1 -1
@@ -94,7 +94,7 @@ apache_detect() {
94
95 apache_get() {
96 local oIFS="${IFS}" ret
97 - IFS=$':\n' apache_response=($(curl -s "${apache_url}"))
97 + IFS=$':\n' apache_response=($(curl -Ss "${apache_url}"))
98 ret=$?
99 IFS="${oIFS}"
100
charts.d/nginx.chart.sh
+1 -1
@@ -19,7 +19,7 @@ nginx_reading=0
19 nginx_writing=0
20 nginx_waiting=0
21 nginx_get() {
22 - nginx_response=($(curl -s "${nginx_url}"))
22 + nginx_response=($(curl -Ss "${nginx_url}"))
23 [ $? -ne 0 -o "${#nginx_response[@]}" -eq 0 ] && return 1
24
25 if [ "${nginx_response[0]}" != "Active" \
charts.d/phpfpm.chart.sh
+1 -1
@@ -30,7 +30,7 @@ phpfpm_max_children_reached=0
30 phpfpm_slow_requests=0
31 phpfpm_get() {
32 url=$1
33 - phpfpm_response=($(curl -s "${url}"))
33 + phpfpm_response=($(curl -Ss "${url}"))
34 [ $? -ne 0 -o "${#phpfpm_response[@]}" -eq 0 ] && return 1
35
36 if [[ "${phpfpm_response[0]}" != "pool:" \
charts.d/tomcat.chart.sh
+7 -1
@@ -41,7 +41,13 @@ tomcat_check() {
41
42 tomcat_get() {
43 # Collect tomcat values
44 - 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 -)
44 + mapfile -t lines < <(curl -Ss "$tomcat_url" |\
45 + xmlstarlet sel \
46 + -t -m "/status/jvm/memory" -v @free \
47 + -n -m "/status/connector[@name='\"http-bio-8080\"']/threadInfo" -v @currentThreadCount \
48 + -n -v @currentThreadsBusy \
49 + -n -m "/status/connector[@name='\"http-bio-8080\"']/requestInfo" -v @requestCount \
50 + -n -v @bytesSent -n -)
51
52 tomcat_jvm_freememory="${lines[0]}"
53 tomcat_threads="${lines[1]}"