Compare commits

..

8 Commits

Author SHA1 Message Date
oleg d93b46ef48 fix 2024-02-28 21:13:38 -05:00
oleg 7f449ce08c Merge branch 'master' of cloud21.cvtt.vpn:/opt/store/git/ops 2024-02-28 19:20:16 -05:00
oleg ec4b1623f8 progress: send_mattermost channels with space 2024-02-28 19:19:16 -05:00
oleg 69a3cd2ecb progress 2024-02-25 21:30:59 -05:00
oleg d7cf5fd7eb progress 2024-02-11 17:12:42 -05:00
oleg a58f15d9d9 version 2024-02-10 21:29:49 -05:00
oleg 81a1db39e3 fix move_archives 2024-02-10 21:29:19 -05:00
oleg bcc5b0562c getting rid of Servarica 2024-02-03 21:21:18 -05:00
4 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
0.5.2 0.5.7
+11 -3
View File
@@ -19,8 +19,8 @@ Hosts="${Hosts} cloud14.cvtt.vpn"
Hosts="${Hosts} cloud15.cvtt.vpn" Hosts="${Hosts} cloud15.cvtt.vpn"
Hosts="${Hosts} cloud16.cvtt.vpn" Hosts="${Hosts} cloud16.cvtt.vpn"
Hosts="${Hosts} cloud17.cvtt.vpn" Hosts="${Hosts} cloud17.cvtt.vpn"
Hosts="${Hosts} cloud19.cvtt.vpn" Hosts="${Hosts} cloud21.cvtt.vpn"
Hosts="${Hosts} cloudstore.cvtt.vpn" Hosts="${Hosts} cloud22.cryptovaltrading.com"
Hosts="${Hosts} cvttdata.cvtt.vpn" Hosts="${Hosts} cvttdata.cvtt.vpn"
Hosts="${Hosts} cryptoval1.cvtt.vpn" Hosts="${Hosts} cryptoval1.cvtt.vpn"
@@ -32,6 +32,9 @@ Hosts="${Hosts} nsbackup.cvtt.vpn"
Hosts="${Hosts} dtvmhost.cvtt.vpn" Hosts="${Hosts} dtvmhost.cvtt.vpn"
Hosts="${Hosts} ops-server.cvtt.vpn" Hosts="${Hosts} ops-server.cvtt.vpn"
Hosts="${Hosts} cvtt-prod-01.cvtt.vpn"
Hosts="${Hosts} cvtt-prod-02.cvtt.vpn"
function space_alert() { function space_alert() {
ALERT_USAGE=75% ALERT_USAGE=75%
for ln in "${Measurements[@]}" for ln in "${Measurements[@]}"
@@ -52,7 +55,12 @@ function storage_check() {
for host in ${Hosts} for host in ${Hosts}
do do
Cmd="ssh $host" if [[ "${host}" == *"cryptovaltrading.com" ]]; then
port=7822
else
port=22
fi
Cmd="ssh -p ${port} $host"
Cmd="${Cmd} eval \"df -hTl" Cmd="${Cmd} eval \"df -hTl"
Cmd="${Cmd} -x squashfs" Cmd="${Cmd} -x squashfs"
Cmd="${Cmd} | grep -v tmpfs" Cmd="${Cmd} | grep -v tmpfs"
+3 -2
View File
@@ -30,7 +30,8 @@ fi
DateCriteria="${Days} days ago" DateCriteria="${Days} days ago"
TargeHost=cloudstore.cvtt.vpn TargetHost=cloud21.cvtt.vpn
TargetRootDir=/opt/store/cvtt/archive
Oldest=$(date -d "${DateCriteria}" '+%Y-%m-%d') Oldest=$(date -d "${DateCriteria}" '+%Y-%m-%d')
Now=$(date '+%Y%m%d_%H%M%S') Now=$(date '+%Y%m%d_%H%M%S')
@@ -53,7 +54,7 @@ if [ "$files" == "" ]
then then
echo "No files found older than ${Oldest} in ${ArchiveDir}" echo "No files found older than ${Oldest} in ${ArchiveDir}"
else else
Target="${TargetHost}:/home/cvtt/Archive/${FromHost}/" Target="${TargetHost}:${TargetRootDir}/${FromHost}/"
echo "Moving files to ${Target}:" echo "Moving files to ${Target}:"
echo ----------------- echo -----------------
for f in ${files} for f in ${files}
+4
View File
@@ -11,6 +11,10 @@ url=$(jq -r '.MATTERMOST.url' ${HOME}/.creds)
team=$(jq -r '.MATTERMOST.team' ${HOME}/.creds) team=$(jq -r '.MATTERMOST.team' ${HOME}/.creds)
bearer=$(jq -r '.MATTERMOST.bearer' ${HOME}/.creds) bearer=$(jq -r '.MATTERMOST.bearer' ${HOME}/.creds)
#lowercase channel
channel_name=$(echo "${channel_name}" | awk '{print tolower($0)}')
# space to '-'
channel_name=${channel_name//" "/"-"}
get_channel_url="${url}/api/v4/teams/name/${team}/channels/name/${channel_name}" get_channel_url="${url}/api/v4/teams/name/${team}/channels/name/${channel_name}"