$ set | grep STATSD_METRICS_ENABLED
STATSD_METRICS_ENABLED=FALSE
$ tail -n 5 /go.sh
if [ "${STATSD_METRICS_ENABLED}" = "TRUE" ]; then
msg "Setting up statsd configuration with server ${STATSD_SERVER}"
echo "statsd_server ${STATSD_SERVER};" > ${NGIX_CONF_DIR}/nginx_statsd_server.conf
echo "statsd_count \"waf.status.\$status\" 1;" > ${NGIX_CONF_DIR}/nginx_statsd_metrics.conf
fi
# so technically this should be disabled ...
but I see the statds service being created in the logs: $ kubectl logs <pod> | head -n 10
...
SETUP:Adding extra config for server context.
SETUP:Setting up statsd configuration with server 127.0.0.1
..
Looking onto the docker entrypoint
$ head /go.sh
#!/usr/bin/env bash
set -e
export LOG_UUID=FALSE
. /defaults.sh <--- suspicions
$ grep STATSD_METRICS_ENABLED /defaults.sh
export STATSD_METRICS_ENABLED=${STATSD_METRICS:-'TRUE'}
# somewhat crap, but looks like the environment variable is already overwritten ..
To test, i change the environment variable from STATSD_METRICS_ENABLED -> STATSD_METRICS: False. And the Connection: send() is removed.
So adding
STATSD_METRICS_ENABLED
should have fixed it .. but they were still getting aconnection send()
error to statsd ...Dropping it into the container,
To test, i change the environment variable from
STATSD_METRICS_ENABLED
->STATSD_METRICS: False
. And theConnection: send()
is removed.