diff options
author | clarkzjw <[email protected]> | 2023-02-24 00:49:12 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-02-24 00:49:12 -0800 |
commit | 391abe42adf3bf065d9543ada068b696b00efdcd (patch) | |
tree | ea85f216881bacb54f579cae9814e2f85aa1abe5 /contrib/influx/initdb.sh | |
parent | b097f3c13ddfa51551bce9ca9344c796e5cea9cb (diff) | |
download | swarm2fediverse-391abe42adf3bf065d9543ada068b696b00efdcd.tar.gz |
deploy: add krakend monitoring using influxdb and grafana
Diffstat (limited to 'contrib/influx/initdb.sh')
-rwxr-xr-x | contrib/influx/initdb.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/contrib/influx/initdb.sh b/contrib/influx/initdb.sh new file mode 100755 index 0000000..b1d07af --- /dev/null +++ b/contrib/influx/initdb.sh | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/bash | ||
2 | # The following script creates the authentication for Grafana | ||
3 | # and is meant to be added to InfluxDB docker-compose.yml file. | ||
4 | # image: influxdb | ||
5 | # volumes: | ||
6 | # - "./config/influx:/docker-entrypoint-initdb.d" | ||
7 | set -e | ||
8 | |||
9 | # Retrieve the ID from the bucket created during setup | ||
10 | BUCKET_ID=$(influx bucket list | grep "$DOCKER_INFLUXDB_INIT_BUCKET" | awk '{print $1}') | ||
11 | |||
12 | influx v1 auth create \ | ||
13 | --username ${DOCKER_INFLUXDB_INIT_USERNAME} \ | ||
14 | --password ${DOCKER_INFLUXDB_INIT_PASSWORD} \ | ||
15 | --write-bucket ${BUCKET_ID} \ | ||
16 | --org ${DOCKER_INFLUXDB_INIT_ORG} | ||