Shell Script to Validate and alert if EBS Oracle Apps URL is working or not
We can use the below script to validate the URL for EBS is working or not and send a mail.
Please check URL and recipient mail id as required.
Script:
#!/bin/bash# URL to checkURL="https://funebstraining.com/OA_HTML/AppsLocalLogin.jsp"# Email detailsTO="recipient@example.com"SUBJECT="URL Check Alert"MESSAGE="The URL $URL is not responding."# Function to check URL statuscheck_url() {STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL")if [ "$STATUS" -ne 200 ]; thensend_emailfi}# Function to send emailsend_email() {echo "$MESSAGE" | mail -s "$SUBJECT" "$TO"}# Run the checkcheck_url
Post a Comment
Post a Comment