Git Product home page Git Product logo

uptimerobot-tool's Introduction

uptimerobot-tool

This tool is for automation website monitoring management. It uses uptimerobot.com free accounts as primary service. You will need json file with websites and their configurations (see example) and several uptimerobot.com accounts (one account per every 50 websites).

Preparation steps

Create several uptimerobot.com accounts (one account per every 50 websites you need to monitor) and get API token from each account. Fill in data/config.yml file (see config.yml.example). After this, you will need to create all alert contacts that will receive alert message in critical situations (remember the names of created alert contacts). alert_contacts_preview

Prepare json file. You can use google sheets and it scrips to transform human-readable table to json, or another software. Json file must have next structure:

[
  {
    "web-site-name": "",
    "config": {
      "keyword": "",
      "keyword_type": "",
      "contact": [""],
      "scheme": "",
      "port": 0
    }
  }
]

In the next table you can see all possible json fields and their values.

Field name Is required Value Description
web-site-name Yes string URL that we will monitor. Without scheme. Example: test.com/healthcheck
config No string Configuration fields for created monitor. If configuration will not provided - monitor will be created with type http(s), scheme http and without alert contacts.
keyword No string If provided - monitor type "keyword" will be used. Keyword is case-sensitive. Examples: "develoment" or "golang is awesome".
keyword_type No string Alert will be sent if provided keyword exists or not exists on website. Possible values: "exist", "not exist" (default).
contact No string An array of alert contact names, that you previously created in every account. For example (from screenshot): "slack", "telegram", "teams".
scheme No string Available scheme for your website. For now can only be "http" or "https" (default).
port No int Port on which your website available. Default 443.

After preparation steps finished, put sitelist.json and config.yml to data/ folder in the root of the project.

Examples

sitelist.json

[
  {
    "web-site-name": "bitbucket.org/product/enterprise",
    "config": {
      "keyword": "Bitbucket",
      "keyword_type": "not exist",
      "contact": ["slack"]
    }
  },
  {
    "web-site-name": "test.com",
    "config": {
      "contact": ["slack", "teams", "telegram"]
    }
  },
  {
    "web-site-name": "uptimerobot.com/terms",
    "config": {
      "keyword": "products",
      "keyword_type": "not exist",
      "contact": ["slack", "telegram"],
      "scheme": "https"
    }
  }
]

config.yml

uptimerobot:
  - token: u1234567-7654321abcdef890g6f924e6
    email: [email protected]
  - token: u1234568-1234567fedvba0986e429fg
    email: [email protected]

Scheduling tasks

If your sitelist.json changes frequently, it makes sense to run the program after every file change, or at least, by cron. For example:

0 11 * * MON /full/path/to/project/uptimerobot-tool

uptimerobot-tool's People

Contributors

1k-off avatar

Stargazers

 avatar

Watchers

 avatar

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.