Skip to content

Website Availability Monitor: add your website to our dashboard and get 24x7 monitoring of its availability (and a badge!)

License

Notifications You must be signed in to change notification settings

yegor256/sixnines

Repository files navigation

logo

Managed by Zerocracy DevOps By Rultor.com We recommend RubyMine

rake PDD status Maintainability Hits-of-Code Lines of code codecov

Availability at SixNines

SixNines is a hosted service to validate and prove availability of your web service and sites.

Read this blog post for more details: SixNines.io, Your Website Availability Monitor.

The badge is available as:

https://www.sixnines.io/b/5fa8?style=flat&format=png

Here, the style parameter can be either round or flat. The format parameter can be either svg (106x20) or png (424x80).

This is how you put it in your README (in Markdown):

[![Availability at SixNines](https://www.sixnines.io/b/5fa8)](https://www.sixnines.io/h/5fa8)

The badge you see above works exactly like that.

DynamoDB Schema

The sn-endpoints table contains all registered end-points:

fields:
  login/H: GitHub login of the owner
  uri/R: URI of the endpoint, e.g. "http://www.google.com/?q=hello"
  id: Unique ID of the endpoint
  active: "yes" if it's alive, "no" otherwise
  created: Epoch time number of when it was added
  hostname: Host name of the URI, e.g. "google.com"
  pings: Total amount of ping's we've done so far
  failures: Total amount of failed attempts
  state: Either "up" or "down"
  updated: Epoch time of the most recent update of this record
  flipped: Epoch time of recent state change
  expires: Epoch time when it has to be pinged again
  log: Detailed log of the most recent failure
  favicon: URI of the favicon
sn-endpoints/unique: (index)
  id/H
sn-endpoints/hostnames: (index)
  active/H
  hostname/R
sn-endpoints/flips: (index)
  active/H
  flipped/R
sn-endpoints/expires: (index)
  active/H
  expires/R

The sn-pings table contains all recent pings:

fields:
  uri/H: URI of the endpoint we pinged
  time/R: Epoch time of ping
  local: IP address where we were pinging from
  remote: IP address of the endpoint we reached
  msec: How many milliseconds it took
  code: HTTP response code (2xx means success)
  delete_on: TTL attribute for DynamoDB (when to delete this item)

How to contribute?

First, install Java 8+, Maven 3.2+, Ruby 2.3+, Rubygems, and Bundler. Then:

$ bundle update
$ bundle exec rake --quiet

The build has to be clean. If it's not, submit an issue.

Then, make your changes, make sure the build is still clean, and submit a pull request.

In order to run a single test:

$ bundle exec rake run

Then, in another terminal:

$ bundle exec ruby test/test_base.rb -n test_lists_flips

Then, if you want to test the UI, open http://localhost:9292 in your browser, and login, if necessary, by adding ?glogin=tester to the URL.