0.0
No commit activity in last 3 years
No release in over 3 years
Pingdom Ruby Client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
~> 3.5

Runtime

 Project Readme

Pingdom RESTful API Client

Pingdom RESTful API wrapper for Ruby.

NOTE: This is a 3rd party gem and not an official product from Pingdom.

Usage

client = Pingdom::Client.new username: u, password: p, key: k
check = client.checks.first #=> #<Pingdom::Check>
check.last_response_time    #=> 200 (ms)
check.status                #=> "up"

result = check.results.first(probes: [1,2,3], status: [:up, :down])
                            #=> #<Pingdom::Result>
result.status               #=> :up
result.up?                  #=> true
result.response_time        #=> 20000 (ms)

avg = check.summary.average(from:   1.month.ago,
                            probes: [1,2,3])
                            #=> #<Pingdom::Summary::Average>
avg.response_time           #=> 200 (ms)
probe_avg = avg.averages.first
probe_avg.response_time     #=> 120 (ms)
probe_avg.probe.name        #=> "Atlanta, GA"

tms = client.tms_recipes.first
                            #=> #<Pingdom::TMSRecipe>
tms.status                  #=> "SUCCESSFUL"

tms_avg = tms.summary.average from: 1.week.ago
                            #=> #<Pingdom::TMSSummary::Average>
tms_avg.response_time       #=> 2760 (ms)

Testing

Create a credentials.yml file in the gem's base directory containing your Pingdom credentials:

username: u
password: p
key: k

Run tests with bundle exec rake.

Contributors