summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"