-
Notifications
You must be signed in to change notification settings - Fork 1
/
start.sh
executable file
·54 lines (44 loc) · 1.74 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# Getting IPs
set -a # Set the 'allexport' option to make sure all variables that are sourced are exported again.
. ${1:-config_prod.env}
export IP_PORT_RONNY01="${RONNY01_IP}:${RONNY01_PORT}"
export IP_PORT_RONNY02="${RONNY02_IP}:${RONNY02_PORT}"
export IP_PORT_RONNY03="${RONNY03_IP}:${RONNY03_PORT}"
export IP_PORT_RONNY04="${RONNY04_IP}:${RONNY04_PORT}"
export IP_PORT_RONNY05="${RONNY05_IP}:${RONNY05_PORT}"
export IP_PORT_RONNY06="${RONNY06_IP}:${RONNY06_PORT}"
export IP_PORT_RONNY07="${RONNY07_IP}:${RONNY07_PORT}"
export IP_PORT_RONNY08="${RONNY08_IP}:${RONNY08_PORT}"
export IP_PORT_TELRAAM="${TELRAAM_IP}:${TELRAAM_PORT}"
export IP_PORT_MANUALCOUNT="${MANUALCOUNT_IP}:${MANUALCOUNT_PORT}"
rm -f \
prometheus/http_hosts.yml \
prometheus/ping_hosts.yml \
prometheus/prometheus.yml \
grafana/provisioning/datasources/datasource.yml \
grafana/config.monitoring \
timesync/config.py \
2>/dev/null
envsubst < prometheus/http_hosts.template.yml \
> prometheus/http_hosts.yml
envsubst < prometheus/ping_hosts.template.yml \
> prometheus/ping_hosts.yml
envsubst < prometheus/prometheus.template.yml \
> prometheus/prometheus.yml
mkdir -p grafana/provisioning/datasources
envsubst < grafana/datasource.template.yml \
> grafana/provisioning/datasources/datasource.yml
envsubst < grafana/config.template.monitoring \
> grafana/config.monitoring
envsubst < timesync/config.template.py \
> timesync/config.py
chmod 444 \
prometheus/http_hosts.yml \
prometheus/ping_hosts.yml \
prometheus/prometheus.yml \
grafana/provisioning/datasources/datasource.yml \
grafana/config.monitoring \
timesync/config.py
# Starting monitoring
docker compose up --build -d