Skip to content

Commit b2fd5f5

Browse files
committed
Updated curl command to request `text/plain`
1 parent 2fa0df7 commit b2fd5f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if [[ -n "${marathon_host}" ]]; then
4949
# ASSUMPTION: there is a graphite app named "api-gateway-graphite" deployed in marathon
5050
#
5151
while true; do \
52-
statsd_host=$(curl -s ${marathon_host}/v2/apps/api-gateway-graphite/tasks | grep 8125 | awk '{for(i=3;i<=NF;++i) printf("%s ", $i) }' | awk '{for(i=1;i<=NF;++i) sub(/\:\d+/,"",$i); print }' ); \
52+
statsd_host=$(curl -s ${marathon_host}/v2/apps/api-gateway-graphite/tasks -H "Accept:text/plain" | grep 8125 | awk '{for(i=3;i<=NF;++i) printf("%s ", $i) }' | awk '{for(i=1;i<=NF;++i) sub(/\:\d+/,"",$i); print }' ); \
5353
if [[ -n "${statsd_host}" ]]; then python /etc/api-gateway/scripts/python/logger/StatsdLogger.py --statsd-host=${statsd_host} > /var/log/api-gateway/statsd-logger.log; fi; \
5454
sleep 6; \
5555
done &

0 commit comments

Comments
 (0)