Update install-dsmon.sh
This commit is contained in:
@@ -58,7 +58,9 @@ if [ "${SET_SERVERMONID}" = "new" ]; then
|
|||||||
ADD_SERVERNAME=${hostname}
|
ADD_SERVERNAME=${hostname}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
QRY="USE servermonitor; INSERT INTO hosts (\`host\`) VALUES ('${ADD_SERVERNAME}');"
|
ADD_SERVERIP=`hostname -I`
|
||||||
|
|
||||||
|
QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`ip\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERIP});"
|
||||||
mysql -h mysqldb.scity.us -P 6033 --user=sysmoninsert --password=sysmoninsert -e "${QRY}"
|
mysql -h mysqldb.scity.us -P 6033 --user=sysmoninsert --password=sysmoninsert -e "${QRY}"
|
||||||
QRY="USE servermonitor; SELECT id FROM hosts WHERE host='${ADD_SERVERNAME}';"
|
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}"`
|
SET_SERVERMONID=`mysql -h mysqldb.scity.us -P 6033 --user=sysmoninsert --password=sysmoninsert -e "${QRY}"`
|
||||||
|
|||||||
Reference in New Issue
Block a user