forked from eth-educators/eth-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
choose-config.sh
executable file
·30 lines (25 loc) · 1.09 KB
/
choose-config.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
#!/bin/sh
# Avoid needing multiple grafana.yml files by checking CLIENT, which is COMPOSE_FILE, for the
# Prometheus config we need.
# Expects a full prometheus command with parameters as argument(s)
case "$CLIENT" in
*lh-base* ) conffile=lh-prom.yml ;;
*lh-consensus* ) conffile=lhcc-prom.yml ;;
*prysm-base* ) conffile=prysm-prom.yml ;;
*prysm-consensus* ) conffile=prysmcc-prom.yml ;;
*nimbus-base* ) conffile=nimbus-prom.yml ;;
*nimbus-consensus* ) conffile=nimbus-prom.yml ;;
*teku-base* ) conffile=teku-prom.yml ;;
*teku-consensus* ) conffile=teku-prom.yml ;;
* ) conffile=none.yml ;;
esac
cp /etc/prometheus/$conffile /etc/prometheus/prometheus.yml
case "$CLIENT" in
*geth* ) cat /etc/prometheus/geth-prom.yml >> /etc/prometheus/prometheus.yml ;;
*erigon* ) cat /etc/prometheus/erigon-prom.yml >> /etc/prometheus/prometheus.yml ;;
*besu* ) cat /etc/prometheus/besu-prom.yml >> /etc/prometheus/prometheus.yml ;;
esac
case "$CLIENT" in
*blox-ssv* ) cat /etc/prometheus/blox-ssv-prom.yml >> /etc/prometheus/prometheus.yml ;;
esac
exec "$@" --config.file=/etc/prometheus/prometheus.yml