[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-grid5k] 62/73: fix monitor
From: |
gnunet |
Subject: |
[taler-grid5k] 62/73: fix monitor |
Date: |
Tue, 14 Dec 2021 15:10:44 +0100 |
This is an automated email from the git hooks/post-receive script.
marco-boss pushed a commit to branch master
in repository grid5k.
commit c802de8b862b83932d83e8b42ee1f3f4b38d7a15
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Fri Dec 10 21:04:23 2021 +0100
fix monitor
---
.../nginx/{sites-available => sites-enabled}/proxy | 0
experiment/scripts/database.sh | 4 ++--
experiment/scripts/monitor.sh | 25 ++++++++++++++++++----
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/configs/etc/nginx/sites-available/proxy
b/configs/etc/nginx/sites-enabled/proxy
similarity index 100%
rename from configs/etc/nginx/sites-available/proxy
rename to configs/etc/nginx/sites-enabled/proxy
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 923498d..706a0a7 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -128,8 +128,8 @@ psql -tAc "SELECT 1 FROM pg_database WHERE
datname='${DB_NAME}'" | \
createdb -O taler-exchange-httpd "${DB_NAME}"
EOF
- sudo -u taler-exchange-httpd taler-exchange-dbinit -r || true
- sudo -u taler-exchange-httpd taler-exchange-dbinit -s || true
+# sudo -u taler-exchange-httpd taler-exchange-dbinit -r || true
+# sudo -u taler-exchange-httpd taler-exchange-dbinit -s || true
sudo -u taler-exchange-httpd taler-exchange-dbinit
su postgres << EOF
diff --git a/experiment/scripts/monitor.sh b/experiment/scripts/monitor.sh
index ddbce61..0e824a0 100755
--- a/experiment/scripts/monitor.sh
+++ b/experiment/scripts/monitor.sh
@@ -59,6 +59,19 @@ function add_wallet_nodes_to_prometheus() {
}
function add_exchanges_to_prometheus() {
+ if ! grep -q "${EXCHANGE_DOMAIN}:80" /etc/monitor/prometheus.yaml; then
+ # unfortunately we do not have access to the other hosts when running from
ESpec
+ # But when initializing there are no hosts listed in the yaml yet, thus
+ # it's sufficient to search for the exchange from the target
+ sed -i "/<EXCHANGES_HERE>/a \ \ \ \ \ \ - '${EXCHANGE_DOMAIN}:80'" \
+ /etc/monitor/prometheus.yaml
+ for i in $(seq $((${NUM_EXCHANGE_PROCESSES:-10}-1)) ); do
+ let "i+=10000"
+ sed -i "/<EXCHANGES_HERE>/a \ \ \ \ \ \ - '${EXCHANGE_DOMAIN}:${i}'" \
+ /etc/monitor/prometheus.yaml
+ done
+ return
+ fi
for EXCH in $(get_exchanges); do
if ! grep -q "${EXCH}" /etc/monitor/prometheus.yaml;
then
@@ -97,12 +110,16 @@ function init_monitor() {
wait_for_keys "${PROXY_DOMAIN}"
if [[ "${ENABLE_EXPORTERS}" == "true" ]]; then
- cat /etc/monitor/node-exporters.yaml.tpl | envsubst >>
/etc/monitor/prometheus.yaml
- add_wallet_nodes_to_prometheus
+ if ! grep -q "job_name: 'nodes'" /etc/monitor/prometheus.yaml; then
+ cat /etc/monitor/node-exporters.yaml.tpl | envsubst >>
/etc/monitor/prometheus.yaml
+ add_wallet_nodes_to_prometheus
+ fi
fi
- cat /etc/monitor/exchange-exporters.yaml.tpl >> /etc/monitor/prometheus.yaml
- add_exchanges_to_prometheus
+ if ! grep -q "job_name: 'taler'" /etc/monitor/prometheus.yaml; then
+ cat /etc/monitor/exchange-exporters.yaml.tpl >>
/etc/monitor/prometheus.yaml
+ add_exchanges_to_prometheus
+ fi
systemctl restart prometheus-nginx-exporter \
prometheus-postgres-exporter \
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-grid5k] 55/73: db disk mount, (continued)
- [taler-grid5k] 55/73: db disk mount, gnunet, 2021/12/14
- [taler-grid5k] 42/73: fix setup.sh, gnunet, 2021/12/14
- [taler-grid5k] 50/73: note about postgres huge pages, gnunet, 2021/12/14
- [taler-grid5k] 39/73: fix typo, gnunet, 2021/12/14
- [taler-grid5k] 60/73: fix logbackup so it gets rotated correctly, gnunet, 2021/12/14
- [taler-grid5k] 57/73: improve wallet script, gnunet, 2021/12/14
- [taler-grid5k] 58/73: sanitize scripts, gnunet, 2021/12/14
- [taler-grid5k] 36/73: Update image build, add install script to install taler binaries in running experiment, gnunet, 2021/12/14
- [taler-grid5k] 63/73: fix, gnunet, 2021/12/14
- [taler-grid5k] 46/73: remove previous builds, gnunet, 2021/12/14
- [taler-grid5k] 62/73: fix monitor,
gnunet <=
- [taler-grid5k] 49/73: monitor dns too, change db settings, gnunet, 2021/12/14
- [taler-grid5k] 59/73: fix taler-perf.sh, improve other scripts, gnunet, 2021/12/14
- [taler-grid5k] 56/73: fix startup, gnunet, 2021/12/14
- [taler-grid5k] 45/73: take postgres config to seperate file, gnunet, 2021/12/14
- [taler-grid5k] 38/73: speedup image build, gnunet, 2021/12/14
- [taler-grid5k] 40/73: document variables, gnunet, 2021/12/14
- [taler-grid5k] 70/73: update plotter README and dashboards, gnunet, 2021/12/14
- [taler-grid5k] 65/73: filter wallet getRecord messages - they spam the logs, gnunet, 2021/12/14
- [taler-grid5k] 51/73: add auto explain - not tested yet, gnunet, 2021/12/14
- [taler-grid5k] 67/73: update dashboards, gnunet, 2021/12/14