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" \
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:" \
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]}"