Browse Source

feat(monitor): add udp query option (#2314)

pull/2317/head
Daniel Gibbs 6 years ago
committed by GitHub
parent
commit
1ba0cd7545
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      lgsm/functions/command_monitor.sh

8
lgsm/functions/command_monitor.sh

@ -30,6 +30,9 @@ for queryattempt in {1..5}; do
elif [ "${querymethod}" == "tcp" ]; then
bash -c 'exec 3<> /dev/tcp/'${ip}'/'${queryport}''
querystatus="$?"
elif [ "${querymethod}" == "udp" ]; then
bash -c 'exec 3<> /dev/udp/'${ip}'/'${queryport}''
querystatus="$?"
fi
if [ "${querystatus}" == "0" ]; then
@ -175,6 +178,11 @@ fn_monitor_query_tcp(){
fn_monitor_loop
}
fn_monitor_query_upd(){
querymethod="upd"
fn_monitor_loop
}
monitorflag=1
fn_print_dots "${servername}"
sleep 0.5

Loading…
Cancel
Save