Browse Source

Update command_monitor.sh

pull/2101/head
Daniel Gibbs 5 years ago
committed by GitHub
parent
commit
55b402aad0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      lgsm/functions/command_monitor.sh

10
lgsm/functions/command_monitor.sh

@ -254,14 +254,14 @@ if [ "${querymode}" != "1" ]; then
# In some complex networking cases, when listening on 0.0.0.0, not all addresses can be used when monitoring. # In some complex networking cases, when listening on 0.0.0.0, not all addresses can be used when monitoring.
# In those cases you sometimes know one IP that will work before starting the container. # In those cases you sometimes know one IP that will work before starting the container.
# Allowing a "query ip" to be set allows binding to 0.0.0.0 while testing against a specfic ip # Allowing a "query ip" to be set allows binding to 0.0.0.0 while testing against a specfic ip
# TODO: LGSM_MONITOR_IP should be configured like all other LGSM settings, reading this from an env is hacky # TODO: MONITOR_IP should be configured like all other LGSM settings, reading this from an env is hacky
if [[ -n "${LGSM_MONITOR_IP}" ]]; then if [ -n "${MONITOR_IP}" ]; then
query_ip="${LGSM_MONITOR_IP}" query_ip="${MONITOR_IP}"
elif [[ ${query_ip} == "0.0.0.0" ]]; then elif [ "${query_ip}" == "0.0.0.0" ]; then
# When binding to all addresses, any of them can be used for testing # When binding to all addresses, any of them can be used for testing
query_ip="$(hostname -i)" query_ip="$(hostname -i)"
else else
query_ip=${ip} query_ip="${ip}"
fi fi
fn_monitor_loop fn_monitor_loop

Loading…
Cancel
Save