Skip to content

Commit

Permalink
Merge pull request #15 from pmithrandir/main
Browse files Browse the repository at this point in the history
Correcting small issues on init.sh and grafana
  • Loading branch information
Kraego authored Apr 20, 2024
2 parents a35a86a + c20d338 commit 718d128
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion grafana/provisioning/datasources/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ datasources:
organization: [ORGANIZATION]
defaultBucket: telegraf
tlsSkipVerify: true
httpHeaderName1: 'Authorization'
secureJsonData:
token: [TOKEN]
httpHeaderValue1: 'token [TOKEN]'
token: '[TOKEN]'

5 changes: 4 additions & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ set -o allexport
source "$ENV_FILE"
set +o allexport

echo "##### Creating folders"
mkdir -p ./mosquitto/log ./mosquitto/data ./mosquitto/certs ./influxdb/config ./influxdb/data ./grafana/var/lib/grafana/plugins

echo "##### Pulling images"
docker-compose pull

Expand Down Expand Up @@ -51,7 +54,7 @@ echo "##### Setting token in environment"
sed -i '/^INFLUX_TOKEN=/s/=.*/='"$auth_token"'/' .env

echo "##### Updating grafana datasource with new values from env"
sed -i 's,\[TOKEN\],'"$auth_token"', g' ./grafana/provisioning/datasources/default.yaml
sed -i 's,\[TOKEN\],'$auth_token', g' ./grafana/provisioning/datasources/default.yaml
sed -i 's,\[ORGANIZATION\],'$GRAFANA_ORG_NAME', g' ./grafana/provisioning/datasources/default.yaml

echo $"##### Done, You now can start the stack with 'docker-compose up -d'"

0 comments on commit 718d128

Please sign in to comment.