Code Monkey home page Code Monkey logo

updownio-tools's Introduction

A set of tools for automating with https://updown.io

Installation

Just clone the repo, there are no dependencies outside the standard nodejs libs.

Usage

update-monitors.js

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.

Example

APIKEY=abcdef node update-monitors.js

Set the APIKEY environment variable to your updown.io API Key

whitelist-cloudflare.js

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.

Example

[email protected] 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.

whitelist-nginx.js

This generates a valid nginx config file with allow statements for all updown.io ips the file will be nginx-whitelist.

Example

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

updownio-tools's People

Contributors

rwky avatar

Stargazers

Slavik Svyrydiuk avatar

Watchers

 avatar James Cloos avatar

Forkers

tttttoo

updownio-tools's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.