Skip to content

Commit

Permalink
Adding needed folder in init.sh, making sure token is initialized wit…
Browse files Browse the repository at this point in the history
…h header to resolve grafana bug
  • Loading branch information
pmithrandir committed Apr 10, 2024
1 parent 5c04891 commit 9b7a0ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions grafana/provisioning/datasources/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ datasources:
url: http://influxdb:8086
jsonData:
version: Flux
organization: grafana_org_name
organization: [ORGANIZATION]
defaultBucket: telegraf
tlsSkipVerify: true
httpHeaderName1: 'Authorization'
secureJsonData:
httpHeaderValue1: TOKEN_VALUE
httpHeaderValue1: [TOKEN_VALUE]
token: [TOKEN_VALUE]

2 changes: 1 addition & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,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_VALUE, '"token $auth_token"', g' ./grafana/provisioning/datasources/default.yaml
sed -i 's,\[TOKEN\], '"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 9b7a0ce

Please sign in to comment.