||6 years ago|
|checks||6 years ago|
|cloudflare||6 years ago|
|core||6 years ago|
|engine||6 years ago|
|handlers||6 years ago|
|.gitignore||6 years ago|
|LICENSE||6 years ago|
|README.md||6 years ago|
|main.go||6 years ago|
CloudFlare High Availability monitor
CFHA is a simple daemon that will continually monitor servers you specify and add/remove them from a shared "A" record in cloudflare.
Configuring CFHA is done through a JSON file, which should be named config.json, and placed in whatever directory you will run CFHA from.
Example configuration file:
(the configuration format is currently in flux, the example will be updated when it is stable. for now just look at
core/config and build a json object to match
CFHA is limited in a few ways, due both to the author, and due to limitations in cloudflare's API / how DNS works.
- CFHA can only operate on
Arecords since it is invalid to have multiple values for CNAME records.
- You must specify each host by IP address because CFHA does not resolve names to IP addresses yet. (And we need to have IP addresses for A records). An interesting feature of implementing this is that you could create a pool A record and CFHA would monitor all of those via a single host entry pointing to that record, but it would require a lot more logic.
- CFHA does not operate on IPv6. This is something that is possible (and maybe even simple) to implement, but has not yet been worked on.
- CFHA is meant to operate on load balancers, and as such only checks for a 200 exit status on a host. You should add a name-based virtual host to nginx that returns 200 on each monitored server, and set the hostname in the check options.
CFHA is made available under an ISC license. Anyone is welcome to make contributions with the understanding that they will be released under that same license.