From 5ced2c1cf5081eb9a5a43b475014d0eeacdd1f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Kr=C3=BCger?= Date: Tue, 16 Mar 2021 13:09:11 +0100 Subject: [PATCH] add ip_variable --- sh_scripts/prometheus.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sh_scripts/prometheus.sh b/sh_scripts/prometheus.sh index 99c5ad3..a79cc42 100644 --- a/sh_scripts/prometheus.sh +++ b/sh_scripts/prometheus.sh @@ -1,4 +1,5 @@ #/bin/bash +IP=$(ifconfig ppp0 | head -n 2 | tail -n 1 | cut -d: -f2 | cut -d" " -f 1) clear echo "################################################" echo "# #" @@ -154,13 +155,18 @@ echo "########################################################################## echo "" echo "DE >" echo "Wenn alles geklappt hat, funktioniert Prometheus und Node_Exporter wunderbar!" -echo "Beides kannst du unter http://:9090/, http://:9100" -echo "und" -echo "http://:3000/ erreichen" +echo "Beides kannst du unter" +echo "http://$IP:9090/" +echo "http://$IP:9100/" +echo "http://$IP:3000/" +echo "erreichen" +echo "" echo "EN >" echo "If everything went well, Prometheus and Node_Exporter will work wonderfully!" -echo "You can access both at http://:9090/, http://:9100" -echo "and" -echo "http://:3000/ to reach" +echo "You can access at" +echo "http://$IP:9090/" +echo "http://$IP:9100/" +echo "http://$IP:3000/" +echo "to reach" echo "" echo "###############################################################################" \ No newline at end of file