Project

uptimr

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Wrapper for the Uptime, a great remote monitoring tool written in node.js. See https://github.com/fzaninotto/uptime
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.14.0
>= 0
~> 3.5.0

Runtime

~> 1.7.9
 Project Readme

Uptimr

Uptimr is a very basic Ruby wrapper for the most excellent Uptime, a Node.js remote application monitoring tool. This wrapper is designed to import data using Uptime's API and transform points more familiar Ruby types

Installation

gem install uptimr

or put it in your Gemfile

gem "uptimr"

Then initialize Uptimr to point to your Uptime API

Uptimr.config |config| do
	config.base_url = "https://yoursite.com/status"
end

Usage

To download your entire list of checks and its associated data

Uptimr::Check.list

This will return an array of check objects with the following attributes

  • id (String) API id for check
  • is_up (Boolean) Indicates if service currently responds to ping
  • first_tested (Time) Time when this check was first tested
  • last_tested (Time) Time when this check was last tested
  • name (String) Name of the check
  • url (String) URL of the check
  • count (Number) Number of samples taken to calculate statistical data
  • responsiveness (Number) % responsiveness of service in a number ranging 0..1
  • response_time (Number) The mean response time in ms
  • availability (Number) % uptime of service in a number ranging 0..1

Note that this wrapper doesn't currently pull hourly, daily or monthly data yet

To look up an individual check by id number, use the following

Uptimr::Check.find(id)

## Todo

  • Allow for basic HTTP authentication
  • Pull hourly, daily & monthly data on checks

License

MIT