From 091ce79f36343057a0a0fd1e460407fbee1d4a5d Mon Sep 17 00:00:00 2001
From: David Georg Reichelt <davidgeorg_reichelt@dagere.de>
Date: Fri, 27 Aug 2021 11:52:02 +0200
Subject: [PATCH] Try curling prometheus endpoint instead of real prometheus

---
 frameworks/common-functions.sh | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/frameworks/common-functions.sh b/frameworks/common-functions.sh
index 14eb954..b92505e 100644
--- a/frameworks/common-functions.sh
+++ b/frameworks/common-functions.sh
@@ -93,16 +93,17 @@ function startZipkin {
 	cd ..
 }
 
+function periodicallyCurlPrometheus {
+	while [ true ]
+	do
+		echo "Curling for prometheus simulation..."
+		curl localhost:8888
+		sleep 1
+	done
+}
+
 function startPrometheus {
-	if [ ! -d prometheus-2.28.1.linux-amd64 ]
-	then
-		wget https://github.com/prometheus/prometheus/releases/download/v2.28.1/prometheus-2.28.1.linux-amd64.tar.gz
-		tar -xvf prometheus-2.28.1.linux-amd64.tar.gz
-		rm prometheus-2.28.1.linux-amd64.tar.gz
-	fi
-	cd prometheus-2.28.1.linux-amd64
-	./prometheus &> prometheus.log &
-	cd ..
+	periodicallyCurlPrometheus &
 }
 
 function stopBackgroundProcess {
-- 
GitLab