Updated to allow both regular domain and agent register domain
This commit is contained in:
@@ -7,7 +7,8 @@ if [ "$EUID" -ne 0 ]; then
|
||||
fi
|
||||
|
||||
# ask for the domain, username, and password
|
||||
read -e -p "Enter Checkmk Server: " -i "gauntcheckmk.home.johnhgaunt.com" CHECK_MK_SERVER
|
||||
read -e -p "Enter Checkmk Server: " -i "checkmk.johnhgaunt.com" CHECK_MK_SERVER
|
||||
read -e -p "Enter Checkmk Agent Server: " -i "gauntcheckmk.home.johnhgaunt.com" CHECK_MK_AGENT_SERVER
|
||||
read -e -p "Enter Checkmk Site Name: " -i "gaunt" SITE_NAME
|
||||
read -e -p "Enter Checkmk Username: " -i "automation" USERNMAE
|
||||
read -e -s -p "Enter ${USERNMAE}'s Password: " PASSWORD
|
||||
@@ -102,7 +103,7 @@ if [ "${VM}" == "false" ]; then
|
||||
fi
|
||||
|
||||
/usr/bin/cmk-agent-ctl register --hostname ${HOSTNAME} \
|
||||
--server ${CHECK_MK_SERVER} --site ${SITE_NAME} \
|
||||
--server ${CHECK_MK_AGENT_SERVER} --site ${SITE_NAME} \
|
||||
--user ${USERNMAE} --password ${PASSWORD} \
|
||||
--trust-cert
|
||||
|
||||
|
||||
Reference in New Issue
Block a user