Skip to content

Using Statuscake's monitoring and Cloudflare to achieve high availability.

Notifications You must be signed in to change notification settings

blackdotsh/StatusCake-CloudFlare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

StatusCake-CloudFlare

Using Statuscake's monitoring and Cloudflare to achieve high availability.

A PHP web hook to handle down notifications from Statuscake. If a Down notification is received, it'll change the A record of a domain on cloudflare to a backup IP set by you.



License: MIT
Dependencies: Web Server, PHP, php-curl lib

Setup:

  1. I suggest you rename the php file to something obscure.
  2. Add / change the global vars section. It consists of credentials and other information that needs to be modified to your needs.
  3. Upload this script to the desired server, make sure the script is accessible via the internet.
  4. On StatusCake:
    Go into group contacts and add the ping URL. This URL is the URL of your PHP script that you just uploaded to your server in step 3.
    Make sure the domains you're monitoring has the correct contact group (a group that contains the ping URL).
  5. It's recommended that you have more than the PHP script as an alert type, so you can switch it back to the primary server once it's up. With this setup, a website shouldn't have a downtime of more than ~6 minutes, assuming your DNS provider does not cache queries.

    You can reach me on twitter .

    If you're looking for UptimeRobot + Cloudflare, you can find it here .

About

Using Statuscake's monitoring and Cloudflare to achieve high availability.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages