Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 180e3f89cf | |||
| 80bbf47755 | |||
| e295aa8dff |
+1
-1
@@ -1 +1 @@
|
||||
0.7.8
|
||||
0.8.1.1
|
||||
|
||||
@@ -15,7 +15,6 @@ Sender=${RootDir}/ops/utils/send_mmost.sh
|
||||
|
||||
Hosts=
|
||||
Hosts="${Hosts} cloud11.cvtt.vpn"
|
||||
Hosts="${Hosts} cloud14.cvtt.vpn"
|
||||
Hosts="${Hosts} cloud15.cvtt.vpn"
|
||||
Hosts="${Hosts} cloud16.cvtt.vpn"
|
||||
Hosts="${Hosts} cloud17.cvtt.vpn"
|
||||
@@ -23,26 +22,31 @@ Hosts="${Hosts} cloud21.cvtt.vpn"
|
||||
Hosts="${Hosts} cloud22.cryptovaltrading.com"
|
||||
|
||||
Hosts="${Hosts} cvttdata.cvtt.vpn"
|
||||
Hosts="${Hosts} cryptoval1.cvtt.vpn"
|
||||
Hosts="${Hosts} cryptoval2.cvtt.vpn"
|
||||
Hosts="${Hosts} cryptoval3.cvtt.vpn"
|
||||
|
||||
Hosts="${Hosts} homestore.cvtt.vpn"
|
||||
Hosts="${Hosts} nsbackup.cvtt.vpn"
|
||||
Hosts="${Hosts} nsbackup.sheynin.home"
|
||||
Hosts="${Hosts} dtvmhost.cvtt.vpn"
|
||||
Hosts="${Hosts} ops-server.cvtt.vpn"
|
||||
|
||||
Hosts="${Hosts} cvtt-prod-01.cvtt.vpn"
|
||||
Hosts="${Hosts} cvtt-prod-02.cvtt.vpn"
|
||||
Hosts="${Hosts} cvtt-prod-03.cvtt.vpn"
|
||||
|
||||
Metrics=()
|
||||
|
||||
function space_alert() {
|
||||
ALERT_USAGE=75%
|
||||
for ln in "${Measurements[@]}"
|
||||
for metric in "${Metrics[@]}"
|
||||
do
|
||||
IFS=$' '; args=($ln); unset IFS
|
||||
IFS=$' '; args=($metric); unset IFS
|
||||
host=${args[0]}
|
||||
fs=${args[1]}
|
||||
space_used=${args[2]}
|
||||
|
||||
echo "if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then" >&2
|
||||
|
||||
if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then
|
||||
echo ":red_circle: Filesystem **${host}:${fs}** is using **${space_used}** :red_circle:"
|
||||
fi
|
||||
@@ -53,6 +57,7 @@ function storage_check() {
|
||||
|
||||
result_lines=()
|
||||
|
||||
declare -a SingleMeas
|
||||
for host in ${Hosts}
|
||||
do
|
||||
if [[ "${host}" == *"cryptovaltrading.com" ]]; then
|
||||
@@ -71,7 +76,12 @@ function storage_check() {
|
||||
do
|
||||
IFS=$' '; args=($ln); unset IFS
|
||||
res="${args[5]}| **${host}** | ***${args[6]}*** | *${args[5]}* |"
|
||||
|
||||
result_lines+=("$res")
|
||||
|
||||
fs=${args[6]}
|
||||
used=${args[5]}
|
||||
Metrics+=("$host $fs $used")
|
||||
done
|
||||
unset IFS
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user