Skip to content

Commit

Permalink
Fixes #1
Browse files Browse the repository at this point in the history
Updated curl command to request `text/plain`
  • Loading branch information
ddragosd committed Sep 7, 2015
1 parent 2fa0df7 commit b2fd5f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.sh
Expand Up @@ -49,7 +49,7 @@ if [[ -n "${marathon_host}" ]]; then
# ASSUMPTION: there is a graphite app named "api-gateway-graphite" deployed in marathon
#
while true; do \
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 }' ); \
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 }' ); \
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; \
sleep 6; \
done &
Expand Down

0 comments on commit b2fd5f5

Please sign in to comment.