scout-api ruby Rubygems

A library for interacting with Scout (http://scoutapp.com), a hosted server monitoring service. Query for metric data, manage servers, and more.

4 years after

= scout_api

A library for interacting with Scout[http://scoutapp.com], a hosted server monitoring service. Query for metric data, manage servers, and more.

== Getting Started

Install the gem if you haven't already:

gem install scout_api

Require the gem and authenticate to get your Scout on (the example uses https://scoutapp.com/youraccountname/ as the account URL):

require 'scout_api' scout = Scout::Account.new('youraccountname', '[email protected]', 'sekret')

== Basics

You can query for the following high-level objects:

  • {Scout::Server}
  • {Scout::Metric}

Each of the classes have Rails-like finder methods. For example:

all servers

Scout::Server.all

first server

Scout::Server.first

first metric with ID=1

Scout::Metric.first(1)

== Metrics

Access your metric data stored in Scout. You can retrieve data for a specific metric or aggregated metrics. For example:

average value of the metric with ID=1 over the past hour

Scout::Metric.average(1)

maximum rate of insert queries over the previous 24 hours

Scout::Server.first(:name => "DB Server").metrics.maximum(:name => 'inserts', :start => Time.now.utc-(243600)2,:end => Time.now.utc-(24*3600) )

== Server Management

Create and delete servers:

create a server using the server with id=6 as the template.

Scout::Server.create('heavy metal',:id => 6) => <#Scout::Server>

delete the server with id=10

Scout::Server.delete(10)

== Ruby Compatibility

scout_api has been tested against Ruby 1.8.7, and Ruby 1.9.2.

== Note on Patches/Pull Requests

  • Fork the project[https://github.com/scoutapp/scout-api].
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

== Copyright

Copyright (c) 2011 Jesse Newland, Derek Haynes. See LICENSE for details.

Related Repositories

sunlight-congress

sunlight-congress

The Sunlight Foundation's Congress API. ...

congress

congress

The Sunlight Foundation's Congress API. ...

helpscout-api-php

helpscout-api-php

PHP Wrapper for the Help Scout API ...

nasa-sdk

nasa-sdk

NASA API wrapper for Node.js ...

scout

scout

AWS EC2 and S3 Security Auditing Tool ...


Top Contributors

itsderek23 jnewland technicalpickles skalnik

Releases

-   v1.1.3 zip tar
-   v1.1.2 zip tar
-   v1.1.1 zip tar
-   v1.1.0 zip tar
-   v1.0.5 zip tar
-   v1.0.5.pre zip tar
-   v1.0.4 zip tar
-   v1.0.4.pre zip tar
-   v1.0.3 zip tar
-   v1.0.2 zip tar
-   v1.0.1 zip tar
-   v1.0.0 zip tar
-   v0.9.1 zip tar