How to Check Site Downtime Using Bash and Cron Job
Get a Ubuntu VPS Server, use this link, so you get free $100 Digital Ocean credit.
Install Golang on your Ubuntu VPS Server: https://linuxize.com/post/how-to-install-go-on-ubuntu-20-04/
Install notify; https://github.com/projectdiscovery/notify#installation-instructions
Source Code for Uptime Checker Bash Script: https://gist.github.com/saintmalik/b10aa014a8f37365cadaf9e86db8a612
chmod +x uptime-check.sh
Enter all the URLS you want to monitor into your "urls.txt" file
now open your crontab using: crontab -e
enter this intto your cron:
* * * * * /home/YOURUSERNAME/uptime-check.sh | /home/YOURUSERNAME/go/bin/notify -silent >> /home/YOURUSERNAME/uptime-check.log 2&1
NOTE: You must have set your slack, telegram or discord webhook in your notify config, you can find it here /home/YOURUSERNAME/.config/notify/notify.conf
If you are looking for how to create slack webhook
If you use slack you should get errors like this if your site is down: