Update dsmon.sh
This commit is contained in:
10
dsmon.sh
10
dsmon.sh
@@ -317,12 +317,12 @@ GETCRONTABS(){
|
||||
# host_ip[${hostid}]=$(echo $hostip | cut -d ";" -f1)
|
||||
# host_name[${hostid}]=$hostname
|
||||
# fi
|
||||
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
|
||||
checkhost=$(CHECK_HOST ${hostip})
|
||||
if [ "${checkhost}" != "false" ]; then
|
||||
echo -en "${idsST[Bold]}${idsCL[LightCyan]} ${host_name[$hostid]} - Gathering Crontabs ... ${idsCL[Default]}${idsST[Reset]}"
|
||||
ssh -tq root@${host_ip[$hostid]} dsmon get-crontab ${rtpsswd}
|
||||
echo -en "${idsST[Bold]}${idsCL[LightCyan]} ${hostname} - Gathering Crontabs ... ${idsCL[Default]}${idsST[Reset]}"
|
||||
ssh -tq root@${hostip} dsmon get-crontab ${rtpsswd}
|
||||
else
|
||||
echo -e "${idsST[Bold]}${idsCL[Red]} ${host_name[$hostid]} - Timeout${idsCL[Default]}${idsST[Reset]}"
|
||||
echo -e "${idsST[Bold]}${idsCL[Red]} ${hostname} - Timeout${idsCL[Default]}${idsST[Reset]}"
|
||||
fi
|
||||
done <<< $(MYSQL_PWD="sysmoninsert" mysql -h ${mysqlip} -P 3306 -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 ORDER BY host ASC")
|
||||
|
||||
@@ -342,7 +342,7 @@ GETCRONTABS(){
|
||||
runtime=$((end-start))
|
||||
echo "Script Runtime: ${runtime}"
|
||||
echo
|
||||
|
||||
dsmon
|
||||
}
|
||||
GETCRONTAB(){
|
||||
if [ "${1}" != "" ]; then
|
||||
|
||||
Reference in New Issue
Block a user