A set of tools for automating with https://updown.io
Just clone the repo, there are no dependencies outside the standard nodejs libs.
Configure your monitors in monitors.json
details of the options can be found at https://updown.io/api
An example file is in monitors-example.json
After completion a new file monitors-new.json
will be created which contains the contents of monitors.json
with the tokens added to each monitor. You can copy this to monitors.json
to update your monitors in the future.
APIKEY=abcdef node update-monitors.js
Set the APIKEY
environment variable to your updown.io API Key
This uses the cloudflare API to whitelist all updown.io servers. It will delete any existing rules with the
notes updownio
then add new rules.
EMAIL=youremail@test.com KEY=abcdef ZONE=gfhijk node whitelist-cloudflare.js
Set EMAIL
to your cloudflare login email KEY
to your cloudflare API Key ZONE
to the id of the zone you wish to add the whitelist to.
This generates a valid nginx config file with allow statements for all updown.io ips the file will be nginx-whitelist
.
node whitelist-nginx.js
Note: this isn't the cleanest code but it's functional, this was hacked together to satisify automation needs, feel free to fork/update/clean it up