Forum Discussion
Jeff_Nguyen_449
Nimbostratus
Sep 29, 2017external monitor using adtest
looking to see if anyone has ever used adtest to create an external monitor to check an AD server pool. We are looking at load balancing KDC services.
Thanks!
Jeff_Nguyen_449
Nimbostratus
Sep 29, 2017this is what i got so far.
!/bin/bash key_msg="succ_cnt=1"
' if user does not provide correct amount of arugments, show them correct way to run it and end program. '
if [ $ -ne 2 ]; then echo "incorrect number of arguments given. run script as follows:" echo "./up.sh hostname username" exit 1 fi
' run adtest command. $1 is the host, $2 is the username. both are read from the command line '
echo "enter password" OUTPUT="$(adtest -t auth -d 10 -h $1 -r ct.chevrontexaco.net -u $2)"
' if you want to see full output of the command, uncomment the following section '
' echo "============================================" echo "$OUTPUT" echo "============================================" '
' if the output contains the key_msg ("succ_cnt=1"), then UP, else DOWN '
echo "${OUTPUT}" | grep -q "$key_msg" && echo "UP" || echo "DOWN"
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects