]> arthur.barton.de Git - netdata.git/commitdiff
added option -Ss to curl so that errors are logged
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 20 Apr 2016 23:03:59 +0000 (02:03 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 20 Apr 2016 23:03:59 +0000 (02:03 +0300)
charts.d/apache.chart.sh
charts.d/nginx.chart.sh
charts.d/phpfpm.chart.sh [changed mode: 0644->0755]
charts.d/tomcat.chart.sh

index 9b6d53b539bf4607ea27d40eaa54150e7daa2668..c0fd3dc30f2f1131ff7a3c20062ea1f3717a84bf 100755 (executable)
@@ -94,7 +94,7 @@ apache_detect() {
 
 apache_get() {
        local oIFS="${IFS}" ret
-       IFS=$':\n' apache_response=($(curl -s "${apache_url}"))
+       IFS=$':\n' apache_response=($(curl -Ss "${apache_url}"))
        ret=$?
        IFS="${oIFS}"
 
index a6795415b4f9a7870d508160e86a1d8589bd7dc6..91f269be2fbfe5e68b9ee3111bb118a82e4fe023 100755 (executable)
@@ -19,7 +19,7 @@ nginx_reading=0
 nginx_writing=0
 nginx_waiting=0
 nginx_get() {
-       nginx_response=($(curl -s "${nginx_url}"))
+       nginx_response=($(curl -Ss "${nginx_url}"))
        [ $? -ne 0 -o "${#nginx_response[@]}" -eq 0 ] && return 1
 
        if [ "${nginx_response[0]}" != "Active" \
old mode 100644 (file)
new mode 100755 (executable)
index 4c54aa5..60e6b2c
@@ -30,7 +30,7 @@ phpfpm_max_children_reached=0
 phpfpm_slow_requests=0
 phpfpm_get() {
        url=$1
-       phpfpm_response=($(curl -s "${url}"))
+       phpfpm_response=($(curl -Ss "${url}"))
        [ $? -ne 0 -o "${#phpfpm_response[@]}" -eq 0 ] && return 1
 
        if [[ "${phpfpm_response[0]}" != "pool:" \
index 55476f425ed51fff9e2f500cf8766367a5920c0c..5ca85e8cf7a1dc5084724dc8c7160b38e9e0f2e1 100755 (executable)
@@ -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]}"