Update dsmon.sh
This commit is contained in:
4
dsmon.sh
4
dsmon.sh
@@ -404,13 +404,13 @@ RUNCMDSLOW(){
|
||||
echo -e "\n${idsCL[White]}The following command will be run on all nodes:"
|
||||
echo -e "${idsST[Bold]}'${idsCL[LightCyan]}$(echo "${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20}" | awk '{$1=$1};1')${idsCL[White]}'${idsCL[Default]}${idsST[Reset]}\n"
|
||||
|
||||
while read hostid hostname hostip hostlimits; do
|
||||
while IFS= read -u 3 hostid hostname hostip hostlimits; do
|
||||
if [ "${hostname}" != "host" ]; then
|
||||
echo -e "${idsST[Bold]}${idsCL[LightCyan]} ${hostname} - $(echo ${hostip} | cut -d ";" -f1)${idsCL[Default]}${idsST[Reset]}"
|
||||
# ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@$(echo ${hostip} | cut -d ";" -f1) ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22}
|
||||
echo
|
||||
fi
|
||||
done <<< $(MYSQL_PWD="sysmoninsert" mariadb --skip-ssl -h ${mysqlip} -P 3307 -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 ORDER BY host ASC")
|
||||
done 3< < $(MYSQL_PWD="sysmoninsert" mariadb --skip-ssl -h ${mysqlip} -P 3307 -u sysmoninsert -e "SELECT id,host,ip,limits FROM servermonitor.hosts WHERE disabled=0 ORDER BY host ASC")
|
||||
|
||||
echo -e "${idsCL[LightGreen]}Complete, the command was ran on all nodes\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user