[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-grid5k] 158/189: additional scripts improved
From: |
gnunet |
Subject: |
[taler-grid5k] 158/189: additional scripts improved |
Date: |
Thu, 28 Apr 2022 10:48:48 +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 24e1089d059dfb1b18c6a0873365142d3ae6763d
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Mon Apr 18 20:28:11 2022 +0200
additional scripts improved
---
additional/grafana/transactions.json | 40 ++++++++++++++++-----------------
additional/persist.sh | 43 +++++++++++++++++++++---------------
additional/recover/run.sh | 3 +++
3 files changed, 48 insertions(+), 38 deletions(-)
diff --git a/additional/grafana/transactions.json
b/additional/grafana/transactions.json
index d7f796a..eaea241 100644
--- a/additional/grafana/transactions.json
+++ b/additional/grafana/transactions.json
@@ -1185,7 +1185,7 @@
"uid": "${DS_PROMETHEUS}"
},
"exemplar": true,
- "expr": "sum by (app)
(rate(taler_requests_total_requests{endpoint=~\"reserves-withdraw|coins-deposit\",
status=\"200\"} [2m]))",
+ "expr": "sum
(rate(taler_requests_total_requests{endpoint=~\"reserves-withdraw|coins-deposit\",
status=\"200\"} [2m]))",
"interval": "",
"legendFormat": "",
"refId": "A"
@@ -1196,7 +1196,7 @@
"type": "gauge"
},
{
- "description": "Total successful (200) requests per second to /withdraw
per second, measured at the nginx proxy in a 10 minute interval.",
+ "description": "Total successful (200) requests per second to /withdraw
per second, measured at the nginx proxy in a 5 minute interval.",
"fieldConfig": {
"defaults": {
"color": {
@@ -1246,8 +1246,9 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "exemplar": true,
- "expr": "sum by (app)
(rate(taler_requests_total_requests{endpoint=\"reserves-withdraw\",
status=\"200\"} [10m] ))",
+ "exemplar": false,
+ "expr": "sum
(rate(taler_requests_total_requests{endpoint=\"reserves-withdraw\",
status=\"200\"} [5m] ))",
+ "instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
@@ -1345,7 +1346,7 @@
"type": "timeseries"
},
{
- "description": "Total successful (200) requests to /deposit per second,
measured at the nginx proxy in a 10 minute interval.",
+ "description": "Total successful (200) requests to /deposit per second,
measured at the nginx proxy in a 5 minute interval.",
"fieldConfig": {
"defaults": {
"color": {
@@ -1395,8 +1396,9 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "exemplar": true,
- "expr": "sum by (app)
(rate(taler_requests_total_requests{endpoint=\"coins-deposit\", status=\"200\"}
[10m] ))",
+ "exemplar": false,
+ "expr": "sum
(rate(taler_requests_total_requests{endpoint=\"coins-deposit\", status=\"200\"}
[5m] ))",
+ "instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
@@ -1459,8 +1461,9 @@
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
- "exemplar": true,
- "expr":
"(sum(count_over_time(taler_requests_total_requests{endpoint=\"coins-deposit\",
status=\"200\"} [10m]))) / (sum
(count_over_time(taler_requests_total_requests{endpoint=\"reserves-withdraw\",
status=\"200\"} [10m])))",
+ "exemplar": false,
+ "expr":
"(sum(rate(taler_requests_total_requests{endpoint=\"coins-deposit\",
status=\"200\"} [5m]))) / (sum
(rate(taler_requests_total_requests{endpoint=\"reserves-withdraw\",
status=\"200\"} [5m])))",
+ "instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
@@ -1694,10 +1697,6 @@
"type": "timeseries"
},
{
- "datasource": {
- "type": "loki",
- "uid": "${DS_LOKI}"
- },
"description": "",
"fieldConfig": {
"defaults": {
@@ -1744,12 +1743,13 @@
"targets": [
{
"datasource": {
- "type": "loki",
- "uid": "${DS_LOKI}"
+ "type": "prometheus",
+ "uid": "${DS_PROMETHEUS}"
},
- "expr": "sum by (app) (rate({job=\"proxy\",
endpoint=\"coins-deposit\", status=\"200\"} [10m] ))",
- "instant": true,
- "range": false,
+ "exemplar": true,
+ "expr": "sum
(rate(taler_requests_total_requests{endpoint=\"coins-deposit\", status=\"200\"}
[5m] ))",
+ "interval": "",
+ "legendFormat": "",
"refId": "A"
}
],
@@ -2189,7 +2189,7 @@
"type": "timeseries"
}
],
- "refresh": "30s",
+ "refresh": "10s",
"schemaVersion": 35,
"style": "dark",
"tags": [
@@ -2207,6 +2207,6 @@
"timezone": "",
"title": "Transactions",
"uid": "83vvgKKnk",
- "version": 129,
+ "version": 134,
"weekStart": ""
}
\ No newline at end of file
diff --git a/additional/persist.sh b/additional/persist.sh
index e1b77c4..49987fc 100755
--- a/additional/persist.sh
+++ b/additional/persist.sh
@@ -8,6 +8,8 @@
set -e
function work_in_progress() {
+ echo -ne '\r\033[K'
+ sleep 1
echo -ne '.\r'
sleep 1
echo -ne '..\r'
@@ -17,14 +19,6 @@ function work_in_progress() {
}
function backup() {
- echo "
- Make sure that:
-
- - Your ssh key to access the grid is added to the ssh-agent with 'ssh-add
<KEY>'
- - The config to access the grid is setup as described in:
-
https://www.grid5000.fr/w/SSH#Using_SSH_ProxyCommand_feature_to_ease_the_access_to_hosts_inside_Grid.275000
- "
-
if [ -z ${1} ]; then
echo "Missing experiment name"
exit 1
@@ -42,12 +36,7 @@ function backup() {
esac
done
fi
-
- if [[ $(ssh-add -L) =~ "The agent has no" ]]; then
- echo "No ssh key added, aborting"
- exit 1
- fi
-
+
# Slugify the name
NAME=$(\
echo "$1" | \
@@ -64,14 +53,16 @@ function backup() {
echo "Creating archive, this can take some time"
ssh g5k 'rm -rf grenoble/g5k.tar* && find . -type l -maxdepth 1 -exec tar
--ignore-failed-read -rf grenoble/g5k.tar -C {} exp-logs exp-data espec-times
2>&1 \; | grep -vi "no such file"' &
- while kill -0 $! > /dev/null 2>&1; do
+ PID=$!
+ while kill -0 $PID > /dev/null 2>&1; do
work_in_progress
done
echo "Compressing archive, this may take some time"
ssh g5k 'gzip grenoble/g5k.tar' &
- while kill -0 $! > /dev/null 2>&1; do
+ PID=$!
+ while kill -0 $PID > /dev/null 2>&1; do
work_in_progress
done
@@ -83,7 +74,8 @@ function backup() {
echo "Creating Backup Tar ${BACKUP_DIR}/${BACKUP_NAME}"
tar -cvf ${BACKUP_DIR}/${BACKUP_NAME} ${G5K_BACKUP} ${2} &
- while kill -0 $! > /dev/null 2>&1; do
+ PID=$!
+ while kill -0 $PID > /dev/null 2>&1; do
work_in_progress
done
@@ -94,11 +86,26 @@ function delete() {
echo "Cleaning up g5k storage"
ssh g5k 'rm grenoble/g5k.tar.gz && $(find . -type l -exec rm -rf
{}/exp-logs/ {}/exp-data {}/espec-times \;)' &
- while kill -0 $! > /dev/null 2>&1; do
+ PID=$!
+ while kill -0 $PID > /dev/null 2>&1; do
work_in_progress
done
}
+echo "
+Make sure that:
+
+- Your ssh key to access the grid is added to the ssh-agent with 'ssh-add
<KEY>'
+- The config to access the grid is setup as described in:
+
https://www.grid5000.fr/w/SSH#Using_SSH_ProxyCommand_feature_to_ease_the_access_to_hosts_inside_Grid.275000
+"
+
+if [[ $(ssh-add -L) =~ "The agent has no" ]]; then
+ echo "No ssh key added, aborting"
+ exit 1
+fi
+
+
case $1 in
-b|--backup)
backup $2 $3
diff --git a/additional/recover/run.sh b/additional/recover/run.sh
index 07c2854..2af439f 100755
--- a/additional/recover/run.sh
+++ b/additional/recover/run.sh
@@ -72,6 +72,9 @@ function ctrl_c() {
trap ctrl_c INT
startup
+while ! wget -q http://localhost:8080; do
+ sleep 2
+done
echo "Instances running, please head to http://localhost:8080"
xdg-open http://localhost:8080 || true
wait
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-grid5k] 120/189: update postgres exporter to work when there is no merchant, update grafana dashboards, (continued)
- [taler-grid5k] 120/189: update postgres exporter to work when there is no merchant, update grafana dashboards, gnunet, 2022/04/28
- [taler-grid5k] 74/189: reduce amount of logging wallets, gnunet, 2022/04/28
- [taler-grid5k] 93/189: possibility to create multiple instances, gnunet, 2022/04/28
- [taler-grid5k] 92/189: configure merchant instance, gnunet, 2022/04/28
- [taler-grid5k] 97/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 114/189: test with sharding, gnunet, 2022/04/28
- [taler-grid5k] 111/189: explain analyze now working with correct postgres config, gnunet, 2022/04/28
- [taler-grid5k] 98/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 102/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 130/189: fix slow query amount, gnunet, 2022/04/28
- [taler-grid5k] 158/189: additional scripts improved,
gnunet <=
- [taler-grid5k] 133/189: cleaner regex, gnunet, 2022/04/28
- [taler-grid5k] 156/189: fix, gnunet, 2022/04/28
- [taler-grid5k] 129/189: slow query time, gnunet, 2022/04/28
- [taler-grid5k] 152/189: deduplicate promtail, gnunet, 2022/04/28
- [taler-grid5k] 169/189: centos add node-exporter, gnunet, 2022/04/28
- [taler-grid5k] 185/189: update taler-perf, gnunet, 2022/04/28
- [taler-grid5k] 187/189: rename to be clearer, gnunet, 2022/04/28
- [taler-grid5k] 173/189: createusers not required for db only, gnunet, 2022/04/28
- [taler-grid5k] 121/189: fix gitignore, gnunet, 2022/04/28
- [taler-grid5k] 164/189: update, gnunet, 2022/04/28