/simple_status

A simple status page (inspired by GitHub Status).

Primary LanguageCSS

Simple Status

A simple status page that displays the current system status and a status history (inspired by GitHub Status).

Code Climate Build Status

Getting started

$ git clone git://github.com/anolson/simple_status.git
$ cd simple_status
$ bundle
$ bundle exec rake db:setup

Start the server

$ bundle exec rails s

Run the specs

$ bundle exec guard

Status API

Get current status

Get the current status.

Request

$ curl http://localhost:3000/api/current_status \
  -u <api_key>:

Response

{
  "state": "up",
  "last_updated": "2013-06-12T02:29:00Z"
}

Update current status with a message

Update the current status with a message. Valid states are either up or down.

Request

$ curl http://localhost:3000/api/current_status \
  -X PUT \
  -d state=up \
  -d "message[body]=All systems go"
  -u <api_key>:

Response

{
  "state": "up",
  "last_updated": "2013-06-12T02:29:00Z"
}

Touch the current status

Simply update the current status last_updated.

Request

$ curl http://localhost:3000/api/current_status/touch \
  -X PUT
  -u <api_key>:

Response

{
  "state": "up",
  "last_updated": "2013-06-12T02:40:27Z"
}

Create status message

Request

$ curl http://localhost:3000/api/messages \
  -X POST \
  -d "message[body]=Still performing db maintenance"
  -u <api_key>:

Response

{
  "body": "Still performing db maintenance",
  "created_at": "2013-06-12T03:32:08Z",
  "state": "down"
}

List status messages

Request

$ curl http://localhost:3000/api/messages \
  -u <api_key>:

Response

[
  {
    "body": "Still performing db maintenance",
    "created_at": "2013-06-12T03:32:08Z",
    "state": "down"
  }
]