Skip to content

Commit 9dae9cc

Browse files
author
Jonathan Chauncey
committed
fix(telegraf): Create nsq topic at startup
This should fix the start up issue where telegraf starts and fluentd has yet to create the metrics topic
1 parent 14d6af0 commit 9dae9cc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

telegraf/rootfs/start-telegraf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#!/bin/sh
22
set -e
33

4+
if [ -n $DEIS_NSQD_SERVICE_HOST ]; then
5+
echo "Creating topic with URL: http://$DEIS_NSQD_SERVICE_HOST:$DEIS_NSQD_SERVICE_PORT/topic/create?topic=$NSQ_CONSUMER_TOPIC"
6+
curl -s -X POST http://$DEIS_NSQD_SERVICE_HOST:$DEIS_NSQD_SERVICE_PORT/topic/create?topic=$NSQ_CONSUMER_TOPIC
7+
fi
8+
49
export PROMETHEUS_BEARER_TOKEN=/var/run/secrets/kubernetes.io/serviceaccount/token
510
if [ -f $PROMETHEUS_BEARER_TOKEN ]; then
611
export TOKEN=$(cat $PROMETHEUS_BEARER_TOKEN)

0 commit comments

Comments
 (0)