0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
API wrapper for scout.com
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5.0
~> 1.3.0

Runtime

~> 0.1.8
~> 0.5.0
 Project Readme

scout_scout¶ ↑

A library for interacting with Scout, a hosted monitoring service.

require 'scout_scout'
scout = ScoutScout.new('youraccountname', 'your@awesome.com', 'sekret')

#all your servers
servers = scout.servers

#one specific server - pass in hostname
ram_hungry = ScoutScout::Server.first('db1.awesome.com')

#all servers that match the hostname.
# see mysql regex formatting: http://dev.mysql.com/doc/refman/5.0/en/regexp.html
app_servers = ScoutScout::Server.all(:host => 'db[0-9]*.awesome.com')

#details on that server's plugins
ram_hungry_plugins = ram_hungry.plugins

#details about a specific plugin
data = ram_hungry.plugin(12345)

#detauls on that server's triggers
ram_hungry_triggers = ram_hungry.triggers

#details about triggers for a specific plugin
plugin_triggers = ram_hungry.plugin(12345).triggers

#all available descriptors
descriptors = ScoutScout::Descriptor.all

# all descriptors on servers that match the provided host
descriptors = ScoutScout::Descriptor.all(:host => 'awesome.com')

#cluster metrics
ScoutScout::Cluster.average('mem_used')

#create a server using the server with id=6 as the template.
ScoutScout::Server.create('heavy metal',:id => 6) => <#ScoutScout::Server>

#delete the server with id=10
ScoutScout::Server.delete(10) => true

Metrics¶ ↑

The library allows you to extract aggregate metrics across all and/or selected servers in your account. See Cluster#average for information and examples.

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • 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 © 2010 Jesse Newland, Derek Haynes. See LICENSE for details.