Daniel Gibbs
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
5 deletions
-
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 |
|
|