#!/bin/bash URL="http://localhost:8000/health" while true do response=$(curl -s -o /dev/null -w "%{http_code}" $URL) if [ "$response" -eq 200 ]; then echo "$(date): Application is UP" else echo "$(date): Application is DOWN" fi sleep 30 done