gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 37/48: custom metrics of postgres exporter only work when


From: gnunet
Subject: [taler-grid5k] 37/48: custom metrics of postgres exporter only work when selecting a db in the url
Date: Sat, 28 May 2022 12:11:57 +0200

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit 780cb4e261b4fde00a6c40803084642ddd95a6e4
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed May 25 11:13:16 2022 +0200

    custom metrics of postgres exporter only work when selecting a db in the url
---
 experiment/scripts/bench2.sh   | 15 +++++++++++++++
 experiment/scripts/database.sh |  6 +++---
 experiment/scripts/monitor.sh  |  8 ++++----
 3 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/experiment/scripts/bench2.sh b/experiment/scripts/bench2.sh
new file mode 100644
index 0000000..8763446
--- /dev/null
+++ b/experiment/scripts/bench2.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+cd ~/taler/wallet-core
+
+git checkout .
+
+#   -e "/reserve found/,+43 d" \
+sed -i \
+    -e "s/checkReserve(http, benchConf.exchange, 
reserveKeyPair.pub)/checkReserve(http, benchConf.exchange, reserveKeyPair.pub, 
30000)/g" \
+    -e "/const refreshDenoms/,+14 d" \
+    -e "s/\* 10/\* 8/g" \
+    packages/taler-wallet-cli/src/bench2.ts
+
+make -j $(nproc) install
+
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 3398a9a..535188f 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -209,7 +209,7 @@ function setup_config() {
   max_parallel_maintenance_workers=12
   
   # out of shared memory
-  max_locks_per_transaction=85
+  max_locks_per_transaction=120
   
   # (max used =~ work_mem * max_connections)
   # NOTE: This formula is not completely correct 
@@ -339,10 +339,10 @@ EOF
   sudo -u taler-exchange-httpd taler-exchange-dbinit -s || true
 
   if [ "${SHARD_DB}" = "true" ]; then
-    sudo -u postgres taler-exchange-dbinit -F ${NUM_SHARDS}
+    sudo -u postgres taler-exchange-dbinit -F -P ${NUM_SHARDS} -f
     configure_shard_access
   elif [ "${PARTITION_DB}" = "true" ]; then
-    sudo -u taler-exchange-httpd taler-exchange-dbinit -P ${NUM_PARTITIONS}
+    sudo -u taler-exchange-httpd taler-exchange-dbinit -P ${NUM_PARTITIONS} -f
   else
     sudo -u taler-exchange-httpd taler-exchange-dbinit
   fi
diff --git a/experiment/scripts/monitor.sh b/experiment/scripts/monitor.sh
index 52d0e97..b10d7df 100755
--- a/experiment/scripts/monitor.sh
+++ b/experiment/scripts/monitor.sh
@@ -71,12 +71,12 @@ function update_grafana() {
 # Configure all exporters which run on this host
 function configure_prometheus_and_exporters() {
   
-  sed -i -e 
"s\<EXCHANGE_DB_URL_HERE>\postgresql://postgres@db.${DNS_ZONE}:5432?sslmode=disable\g"
 \
+  sed -i -e 
"s\<EXCHANGE_DB_URL_HERE>\postgresql://postgres@db.${DNS_ZONE}:5432/${DB_NAME}?sslmode=disable\g"
 \
              /etc/default/prometheus-postgres-exporter
   
   CFG=""
   for MERCH in $(get_hosts "merchant"); do
-    CFG="${CFG},postgresql://postgres@${MERCH}.${DNS_ZONE}:5432"
+    
CFG="${CFG},postgresql://postgres@${MERCH}.${DNS_ZONE}:5432/taler-merchant?sslmode=disable"
     sed -i "s/<MERCHANT_HOST_HERE>/${MERCH}.${DNS_ZONE}/g" \
            /etc/monitor/prometheus.yaml
   done
@@ -85,7 +85,7 @@ function configure_prometheus_and_exporters() {
 
   CFG=""
   for SHARD in $(get_hosts "shard"); do
-    CFG="${CFG},postgresql://postgres@${SHARD}.${DNS_ZONE}:5432"
+    
CFG="${CFG},postgresql://postgres@${SHARD}.${DNS_ZONE}:5432/${DB_NAME}?sslmode=disable"
   done
   sed -i "s|<SHARD_DB_URLS_HERE>|${CFG}|g" \
           /etc/default/prometheus-postgres-exporter
@@ -94,7 +94,7 @@ function configure_prometheus_and_exporters() {
   if [[ ${NUM_AUDITORS} -ge 1 ]] && \
      [[ ${TALER_SETUP_AUDITOR_REPLICATION} == 1 ]];
   then
-    CFG="${CFG},postgresql://postgres@auditor.${DNS_ZONE}:5432"
+    
CFG="${CFG},postgresql://postgres@auditor.${DNS_ZONE}:5432/taler-ingress?sslmode=disable"
   fi
   sed -i "s|<AUDITOR_DB_URL_HERE>|${CFG}|g" \
           /etc/default/prometheus-postgres-exporter

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]