summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranweshadas <anwesha@das.community>2022-05-12 13:56:39 +0200
committeranweshadas <anwesha@das.community>2022-05-12 13:56:39 +0200
commit73a817a3c871d7d7aea38f4589fde022473582b2 (patch)
tree3653eb457bd949594bfe80fca9c2e20804696f52
parentf4b75773928c1196bb92fbc430d20f8039c69f4a (diff)
Fixes the subject line of the error message
-rwxr-xr-xscripts/monitor.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/monitor.sh b/scripts/monitor.sh
index 3abb8dc..2d2722b 100755
--- a/scripts/monitor.sh
+++ b/scripts/monitor.sh
@@ -15,6 +15,7 @@ function safe_methods() {
response=$(curl -s -w "%{http_code}" $url)
http_code=$(tail -n1 <<< "$response")
domain_name=$(echo $url | awk -F[/:] '{print $4}')
+ api=$url
if [ $http_code != 200 ]; then
msg="$(date +"%y-%m-%d %H:%M:%S %Z") Warning: $url is down. status_code $http_code"
fail "$msg"