Compare commits

..

3 Commits

Author SHA1 Message Date
oleg 2b2056171e progress 2024-07-16 14:37:46 -04:00
oleg 913d971663 progress 2024-07-16 12:11:37 -04:00
oleg 0f6d7874de progress 2024-06-13 19:40:49 -04:00
3 changed files with 15 additions and 17 deletions
+1 -1
View File
@@ -1 +1 @@
0.8.2.2
0.8.5
+4 -4
View File
@@ -4,14 +4,14 @@ Python=/home/cvtt/.pyenv/python3.10-venv/bin/python3.10
RootDir=/home/cvtt/prod
export PYTHONPATH=${RootDir}
host=$(hostname)
host=${1}
if [ "${host}" == "cvttdata" ]
then
ArchiveRootDir=/home/cvtt/prod/archive/md_archive
ArchiveRootDir=/home/cvtt/prod/archive/md_archive/cvttdata
CredKey=TSDB_MD_CVTTDATA_RO
elif [ "${host}" == "cloud21.cryptovaltrading.com" ]
elif [ "${host}" == "cloud21" ]
then
ArchiveRootDir=/opt/store/cvtt/archive/md_archive
ArchiveRootDir=/home/cvtt/prod/archive/md_archive/cloud21
CredKey=TSDB_MD_CLD21_RO
else
echo "Unknown host ${host}. ${0} Aborted."
+10 -12
View File
@@ -38,20 +38,13 @@ Metrics=()
TempFiles=
function cleanup {
echo Cleaing up temporary files: ${TempFiles}
if [ "" != "${TempFiles}" ]; then
echo rm -f ${TempFiles}
rm -f ${TempFiles}
fi
}
trap cleanup EXIT
function new_tempfile {
tmpfile=$(mktemp)
TempFiles="${TempFiles} ${tmpfile}"
echo ${tmpfile}
}
function space_alert() {
ALERT_USAGE=75%
for metric in "${Metrics[@]}"
@@ -105,8 +98,12 @@ function storage_check() {
done
}
tmpfile=$(new_tempfile)
tmpfile2=$(new_tempfile)
tmpfile=$(mktemp)
TempFiles="${TempFiles} ${tmpfile}"
tmpfile2=$(mktemp)
TempFiles="${TempFiles} ${tmpfile2}"
storage_check > ${tmpfile2}
echo "## :card_file_box: STORAGE HEALTH CHECK" >> ${tmpfile}
@@ -116,8 +113,9 @@ echo "| --- | --- | --- |" >> ${tmpfile}
cat ${tmpfile2} | sort -h -r | awk -F'%' '{printf "%s%%%s\n",$2,$3}' >> ${tmpfile}
cat ${tmpfile} | ${Sender} ${StatusChannel}
Measurements=()
tmpfile=$(new_tempfile)
tmpfile=$(mktemp)
TempFiles="${TempFiles} ${tmpfile}"
space_alert > ${tmpfile}
if [ -s ${tmpfile} ]
then