From 4d4abe2edc663037396d1bceea07c32fc2292727 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 14 Jun 2025 23:18:41 -0500 Subject: [PATCH] Update install-dsmon.sh --- install-dsmon.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install-dsmon.sh b/install-dsmon.sh index 04f39fb..10e1840 100755 --- a/install-dsmon.sh +++ b/install-dsmon.sh @@ -144,6 +144,7 @@ if [ "${SET_SERVERMONID}" = "new" ]; then source /opt/idssys/dsmon/config.settings.inc ADD_SERVERHOSTNAME=(`hostname`) + ADD_SERVERHOSTNAME_FULL=(`hostname -f`) ADD_SERVERIP=(`hostname -I`) ADD_SERVERIPS='' for nip in "${ADD_SERVERIP[@]}"; do @@ -162,7 +163,7 @@ if [ "${SET_SERVERMONID}" = "new" ]; then done if [ "${mysqlip}" != "" ]; then - QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`hostname\`,\`ip\`,\`limits\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERHOSTNAME}','${SERVERIPS// /}','${thresholdlog[@]}');" + QRY="USE servermonitor; INSERT INTO hosts (\`host\`,\`hostname\`,\`hostname_full\`,\`ip\`,\`limits\`) VALUES ('${ADD_SERVERNAME}','${ADD_SERVERHOSTNAME}','${ADD_SERVERHOSTNAME_FULL}','${SERVERIPS// /}','${thresholdlog[@]}');" ${mysqlcmd} -h ${mysqlip} -u sysmoninsert -psysmoninsert -e "${QRY}" QRY="USE servermonitor; SELECT id FROM hosts WHERE host='${ADD_SERVERNAME}';" SET_SERVERMONID=`${mysqlcmd} -h ${mysqlip} -u sysmoninsert -psysmoninsert -e "${QRY}"`