Edit file File name : check_a2_whmcs_nginx_connections.sh Content :#!/bin/bash # Ref - SYSENG-27485 - send nginx connection status to mother! # by - sbhat # n_data=$(curl -s --connect-timeout 5 https://my.a2hosting.com/nginx_status) active_conn=$(echo -e ${n_data} | grep "Active connections:" | awk '{print $3}') reading_conn=$(echo -e ${n_data} | grep "Reading:" | awk '{print $12}') writing_conn=$(echo -e ${n_data} | grep "Writing:" | awk '{print $14}') waiting_conn=$(echo -e ${n_data} | grep "Waiting:" | awk '{print $NF}') # Determine status for active connections if [ "$active_conn" -gt 200 ]; then echo "check_a2_whmcs_nginx_connections - nginx has more than 200 active connections" exit 2 else echo "check_a2_whmcs_nginx_connections - nginx has less than 200 active connections" exit 0 fi Save