Update install-dsmon.sh
This commit is contained in:
@@ -145,8 +145,8 @@ if [ "${SET_SERVERMONID}" = "new" ]; then
|
||||
for KEY in "${!THRESHOLD[@]}"; do
|
||||
thresholdlog+=("${KEY}:${THRESHOLD[$KEY]}")
|
||||
done
|
||||
|
||||
QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`hostname\`,\`ip\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERHOSTNAME}','${SERVERIPS// /}');"
|
||||
|
||||
QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`hostname\`,\`ip\`,\`limits\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERHOSTNAME}','${SERVERIPS// /}','${thresholdlog[@]}');"
|
||||
mysql -h mysqldb.scity.us -P 6033 --user=sysmoninsert --password=sysmoninsert -e "${QRY}"
|
||||
QRY="USE servermonitor; SELECT id FROM hosts WHERE host='${ADD_SERVERNAME}';"
|
||||
SET_SERVERMONID=`mysql -h mysqldb.scity.us -P 6033 --user=sysmoninsert --password=sysmoninsert -e "${QRY}"`
|
||||
|
||||
Reference in New Issue
Block a user