Spend least amount of recurring money to monitor your application.
Get notified when I am online when my server goes down.
Backstory: I am running the Open Source Go application on a single $5 Digital Ocean server. No Load Balancers, No fancy hardware, no high end configuration, no Docker, just the application running on Caddy for self signed Certificates, no
Search for the tools
Ideally having another server monitor this process is the basic idea, but I did not want to setup/maintain another DO server in a different location. Since pushing is not an option, polling is another
PagerDuty is one of the famous paying options of $9/month. Found few other solutions like Pingdom, but none of them had international calling or right integrations to notify me.
I finally I went down with was HealthChecks. The idea is to set an expectation of a cron which runs every X minutes etc., and meeting that expectation of cron finished running successfully or not. It has limits on the number of crons made per user and the history stored. I used Pushbullet extensively to pass websites from mobile to the desktop.
while [ 1 ] ; do t=$(curl -D - -s https://gitnotify.com/home | head -1 | egrep -o 200) if [[ "$?" -eq "0" ]]; then curl --retry 3 https://hchk.io/12345678-abcd-1234-abcd-123456789012 fi echo -ne " $t " date sleep 58 done
The False Positives:
The health check used to fail occasionally there used to be errors occasionally with the curl command informing that it cannot resolve the IP address of the domain or could not connect to the server (from the gateway). I choose not to spend time on this problem though since it was intermittent.comments powered by Disqus