mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
Server monitoring tools
This commit is contained in:
parent
9db728e1ad
commit
841c97982f
10 changed files with 586 additions and 9 deletions
49
bin/v-list-sys-web-status
Executable file
49
bin/v-list-sys-web-status
Executable file
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
# info: list web status
|
||||
# options: [FORMAT]
|
||||
#
|
||||
# The function lists web server status
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
#format=${1-shell}
|
||||
|
||||
# Includes
|
||||
#source $VESTA/func/main.sh
|
||||
source $VESTA/conf/vesta.conf
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Checking web system
|
||||
if [ -z "$WEB_SYSTEM" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Displaying proxy status
|
||||
if [ "$PROXY_SYSTEM" = 'nginx' ]; then
|
||||
echo "<h2>$PROXY_SYSTEM STATUS</h2>"| tr '[:lower:]' '[:upper:]'
|
||||
wget -qO- http://localhost:8084/
|
||||
echo "<br><br><br>"
|
||||
fi
|
||||
|
||||
# Displaying web server status
|
||||
echo "<h2>$WEB_SYSTEM STATUS</h2>"| tr '[:lower:]' '[:upper:]'
|
||||
if [ "$WEB_SYSTEM" != 'nginx' ]; then
|
||||
wget -qO- http://localhost:8081/server-status/ |\
|
||||
egrep -v "html|DOCTYPE|h1>|title|head"
|
||||
else
|
||||
wget -qO- http://localhost:8084/
|
||||
fi
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue