gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 22/48: verified auditor


From: gnunet
Subject: [taler-grid5k] 22/48: verified auditor
Date: Sat, 28 May 2022 12:11:42 +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 51125241e19a7823cb56aa640098d1466a9fffb9
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sat May 14 19:55:36 2022 +0200

    verified auditor
---
 additional/grafana/transactions.json | 90 +++++++++++++++++++++++++++++++++---
 experiment/env                       |  3 ++
 experiment/scripts/auditor.sh        |  7 +++
 experiment/scripts/database.sh       |  8 +++-
 experiment/scripts/monitor.sh        |  4 +-
 5 files changed, 103 insertions(+), 9 deletions(-)

diff --git a/additional/grafana/transactions.json 
b/additional/grafana/transactions.json
index ae60c92..7c17a8a 100644
--- a/additional/grafana/transactions.json
+++ b/additional/grafana/transactions.json
@@ -1055,6 +1055,82 @@
       "title": "EdDSA",
       "type": "stat"
     },
+    {
+      "description": "",
+      "fieldConfig": {
+        "defaults": {
+          "color": {
+            "mode": "thresholds"
+          },
+          "mappings": [
+            {
+              "options": {
+                "0": {
+                  "color": "red",
+                  "index": 1,
+                  "text": "DOWN"
+                },
+                "1": {
+                  "color": "green",
+                  "index": 0,
+                  "text": "OK"
+                }
+              },
+              "type": "value"
+            }
+          ],
+          "thresholds": {
+            "mode": "absolute",
+            "steps": [
+              {
+                "color": "green",
+                "value": null
+              }
+            ]
+          }
+        },
+        "overrides": []
+      },
+      "gridPos": {
+        "h": 2,
+        "w": 2,
+        "x": 20,
+        "y": 3
+      },
+      "id": 79,
+      "options": {
+        "colorMode": "value",
+        "graphMode": "area",
+        "justifyMode": "auto",
+        "orientation": "auto",
+        "reduceOptions": {
+          "calcs": [
+            "lastNotNull"
+          ],
+          "fields": "",
+          "values": false
+        },
+        "text": {},
+        "textMode": "auto"
+      },
+      "pluginVersion": "8.4.6",
+      "targets": [
+        {
+          "datasource": {
+            "type": "prometheus",
+            "uid": "${DS_PROMETHEUS}"
+          },
+          "exemplar": false,
+          "expr": "node_systemd_unit_state{name=\"taler-fakebank.service\", 
state=\"active\"}",
+          "instant": true,
+          "interval": "",
+          "legendFormat": "",
+          "refId": "A"
+        }
+      ],
+      "title": "Fakebank",
+      "type": "stat"
+    },
     {
       "description": "",
       "fieldConfig": {
@@ -1307,13 +1383,13 @@
               "tooltip": false,
               "viz": false
             },
-            "lineInterpolation": "linear",
+            "lineInterpolation": "smooth",
             "lineWidth": 1,
             "pointSize": 5,
             "scaleDistribution": {
               "type": "linear"
             },
-            "showPoints": "auto",
+            "showPoints": "never",
             "spanNulls": false,
             "stacking": {
               "group": "A",
@@ -1364,6 +1440,7 @@
           "exemplar": false,
           "expr": "sum by(__name__) 
(rate(taler_requests_total_requests{endpoint=\"reserves-withdraw\", 
status=\"200\"} [2m]) or vector(0)) + on () sum by (__name__) 
(rate(taler_exchange_batch_withdraw_num_coins{} [2m]) or vector(0))",
           "interval": "",
+          "intervalFactor": 2,
           "legendFormat": "Withdraw",
           "refId": "A"
         },
@@ -1376,6 +1453,7 @@
           "expr": 
"sum(rate(taler_requests_total_requests{endpoint=\"coins-deposit\", 
status=\"200\"}[2m]))",
           "hide": false,
           "interval": "",
+          "intervalFactor": 2,
           "legendFormat": "Deposit",
           "refId": "B"
         }
@@ -1398,7 +1476,7 @@
                 "value": null
               },
               {
-                "color": "semi-dark-red",
+                "color": "text",
                 "value": 0
               },
               {
@@ -1515,7 +1593,7 @@
             "uid": "${DS_PROMETHEUS}"
           },
           "exemplar": false,
-          "expr": "sum by (__name__) 
(rate(taler_requests_total_requests{endpoint=\"reserves-withdraw\", 
status=\"200\"} [5m]) or vector(0)) + on (__name__) sum by (__name__) 
(rate(taler_exchange_batch_withdraw_num_coins{} [2m]) or vector(0))",
+          "expr": "sum by (__name__) 
(rate(taler_requests_total_requests{endpoint=\"reserves-withdraw\", 
status=\"200\"} [5m]) or vector(0)) + on (__name__) sum by (__name__) 
(rate(taler_exchange_batch_withdraw_num_coins{} [5m]) or vector(0))",
           "instant": true,
           "interval": "",
           "legendFormat": "",
@@ -2432,7 +2510,7 @@
       "type": "bargauge"
     }
   ],
-  "refresh": "5s",
+  "refresh": "10s",
   "schemaVersion": 35,
   "style": "dark",
   "tags": [
@@ -2450,6 +2528,6 @@
   "timezone": "",
   "title": "Transactions",
   "uid": "83vvgKKnk",
-  "version": 156,
+  "version": 162,
   "weekStart": ""
 }
\ No newline at end of file
diff --git a/experiment/env b/experiment/env
index 82eb443..017ae33 100644
--- a/experiment/env
+++ b/experiment/env
@@ -133,6 +133,9 @@ NUM_AGGREGATOR_PROCESSES=0
    NUM_TRANSER_PROCESSES=1
 NUM_WIREWATTCH_PROCESSES=1
 
+# If the auditor should be setup or not when the node is added in the rspec
+TALER_SETUP_AUDITOR_REPLICATION=0
+
 # If prometheus node exporter should be enabled
 # Most certainly this is true, since otherwise no overview
 # of services and running wallets can be generated in grafana.
diff --git a/experiment/scripts/auditor.sh b/experiment/scripts/auditor.sh
index 8b2ce43..f8a9972 100644
--- a/experiment/scripts/auditor.sh
+++ b/experiment/scripts/auditor.sh
@@ -23,6 +23,9 @@ function init_db() {
   echo "
   listen_addresses='*'
   wal_level = logical
+  min_wal_size = 20GB
+  max_wal_size = 200GB
+  synchronous_commit=off
   " > /etc/postgresql/${POSTGRES_VERSION}/main/auditor.conf
 
   echo "
@@ -123,6 +126,10 @@ function init_auditor() {
 
 case $1 in 
   init)
+    if [[ "${TALER_SETUP_AUDITOR_REPLICATION}" == "0" ]]; then
+      echo "Not setting up auditor"
+      exit 0
+    fi
     if [[ "${PARTITION_DB}" == "true" ]]; then
       init_auditor
     else
diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 8a22bb7..3398a9a 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -229,7 +229,9 @@ function setup_config() {
   " > ${PG_CONF}/exchange.conf
 
   # Must be done here otherwise pg does not start a second time
-  if [[ ${NUM_AUDITORS} -gt 0 ]]; then
+  if [[ ${NUM_AUDITORS} -ge 1 ]] && \
+     [[ ${TALER_SETUP_AUDITOR_REPLICATION} == 1 ]];
+  then
     echo "wal_level=logical" >> ${PG_CONF}/exchange.conf
   fi
 
@@ -259,7 +261,9 @@ function setup_pgbouncer() {
 
 # Enable replication to the auditor - is only done when an auditor node is 
present
 function setup_replication() {
-  if [[ "${NUM_AUDITORS}" -gt 0 ]]; then
+  if [[ "${NUM_AUDITORS}" -ge 1 ]] && \
+     [[ ${TALER_SETUP_AUDITOR_REPLICATION} == 1 ]];
+  then
     su postgres << EOF
       createuser --replication egress
       psql -tAc "ALTER ROLE egress WITH PASSWORD '${DB_PASSWORD}';" || true
diff --git a/experiment/scripts/monitor.sh b/experiment/scripts/monitor.sh
index 0614b11..52d0e97 100755
--- a/experiment/scripts/monitor.sh
+++ b/experiment/scripts/monitor.sh
@@ -91,7 +91,9 @@ function configure_prometheus_and_exporters() {
           /etc/default/prometheus-postgres-exporter
   
   CFG=""
-  if [[ ${NUM_AUDITORS} -ge 1 ]]; then
+  if [[ ${NUM_AUDITORS} -ge 1 ]] && \
+     [[ ${TALER_SETUP_AUDITOR_REPLICATION} == 1 ]];
+  then
     CFG="${CFG},postgresql://postgres@auditor.${DNS_ZONE}:5432"
   fi
   sed -i "s|<AUDITOR_DB_URL_HERE>|${CFG}|g" \

-- 
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]