Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 180e3f89cf | |||
| 80bbf47755 |
+1
-1
@@ -1 +1 @@
|
|||||||
0.7.9
|
0.8.1.1
|
||||||
|
|||||||
@@ -34,14 +34,19 @@ Hosts="${Hosts} cvtt-prod-01.cvtt.vpn"
|
|||||||
Hosts="${Hosts} cvtt-prod-02.cvtt.vpn"
|
Hosts="${Hosts} cvtt-prod-02.cvtt.vpn"
|
||||||
Hosts="${Hosts} cvtt-prod-03.cvtt.vpn"
|
Hosts="${Hosts} cvtt-prod-03.cvtt.vpn"
|
||||||
|
|
||||||
|
Metrics=()
|
||||||
|
|
||||||
function space_alert() {
|
function space_alert() {
|
||||||
ALERT_USAGE=75%
|
ALERT_USAGE=75%
|
||||||
for ln in "${Measurements[@]}"
|
for metric in "${Metrics[@]}"
|
||||||
do
|
do
|
||||||
IFS=$' '; args=($ln); unset IFS
|
IFS=$' '; args=($metric); unset IFS
|
||||||
host=${args[0]}
|
host=${args[0]}
|
||||||
fs=${args[1]}
|
fs=${args[1]}
|
||||||
space_used=${args[2]}
|
space_used=${args[2]}
|
||||||
|
|
||||||
|
echo "if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then" >&2
|
||||||
|
|
||||||
if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then
|
if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then
|
||||||
echo ":red_circle: Filesystem **${host}:${fs}** is using **${space_used}** :red_circle:"
|
echo ":red_circle: Filesystem **${host}:${fs}** is using **${space_used}** :red_circle:"
|
||||||
fi
|
fi
|
||||||
@@ -52,6 +57,7 @@ function storage_check() {
|
|||||||
|
|
||||||
result_lines=()
|
result_lines=()
|
||||||
|
|
||||||
|
declare -a SingleMeas
|
||||||
for host in ${Hosts}
|
for host in ${Hosts}
|
||||||
do
|
do
|
||||||
if [[ "${host}" == *"cryptovaltrading.com" ]]; then
|
if [[ "${host}" == *"cryptovaltrading.com" ]]; then
|
||||||
@@ -70,7 +76,12 @@ function storage_check() {
|
|||||||
do
|
do
|
||||||
IFS=$' '; args=($ln); unset IFS
|
IFS=$' '; args=($ln); unset IFS
|
||||||
res="${args[5]}| **${host}** | ***${args[6]}*** | *${args[5]}* |"
|
res="${args[5]}| **${host}** | ***${args[6]}*** | *${args[5]}* |"
|
||||||
|
|
||||||
result_lines+=("$res")
|
result_lines+=("$res")
|
||||||
|
|
||||||
|
fs=${args[6]}
|
||||||
|
used=${args[5]}
|
||||||
|
Metrics+=("$host $fs $used")
|
||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user