aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclarkzjw <[email protected]>2023-02-24 00:49:12 -0800
committerclarkzjw <[email protected]>2023-02-24 00:49:12 -0800
commit391abe42adf3bf065d9543ada068b696b00efdcd (patch)
treeea85f216881bacb54f579cae9814e2f85aa1abe5 /contrib/influx/initdb.sh
parentb097f3c13ddfa51551bce9ca9344c796e5cea9cb (diff)
downloadswarm2fediverse-391abe42adf3bf065d9543ada068b696b00efdcd.tar.gz
deploy: add krakend monitoring using influxdb and grafana
Diffstat (limited to 'contrib/influx/initdb.sh')
-rwxr-xr-xcontrib/influx/initdb.sh16
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"
7set -e
8
9# Retrieve the ID from the bucket created during setup
10BUCKET_ID=$(influx bucket list | grep "$DOCKER_INFLUXDB_INIT_BUCKET" | awk '{print $1}')
11
12influx 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}
Powered by cgit v1.2.3 (git 2.41.0)