My script to send sms
#send-sms.sh
curl "http://10.10.10.10:1084/somerandomhexcode&username=username@goes.here&password=passwordgOesHere&countryCode=countrycodegoeshere&mobileNumber=%2bphone_number_with_country_code_goes_here&message=message_goes_here "
I've tested this script independently and it sends SMS successfully.
My monit config to check if a certain glassfish domain is down:
check host DOMAIN_I_WANT_TO_CHECK with address 127.0.0.1
if failed port 10080 then exec "/root/send-sms.sh"
send-sms.sh
is executable with chmod 777
.
Imagine a scenario where the server goes down at 11 PM till 5AM, and alert keeps going every 60 seconds. It'll be an absolute nightmare. How do I avoid such scenarios?
Asked by achhainsan
(543 rep)
Mar 10, 2024, 03:18 PM
Last activity: Feb 15, 2025, 01:11 PM
Last activity: Feb 15, 2025, 01:11 PM