Class Scout::Server
In: lib/scout/server.rb
Parent: Object

Methods

Classes and Modules

Class Scout::Server::PluginTimeoutError

Constants

URLS = { :plan => "/clients/CLIENT_KEY/plugins.scout?version=CLIENT_VERSION", :report => "/clients/CLIENT_KEY/plugins/PLUGIN_ID/reports.scout?version=CLIENT_VERSION", :error => "/clients/CLIENT_KEY/plugins/PLUGIN_ID/errors.scout?version=CLIENT_VERSION", :alert => "/clients/CLIENT_KEY/plugins/PLUGIN_ID/alerts.scout?version=CLIENT_VERSION", :clone => "/clients/CLIENT_KEY/clone_from?version=CLIENT_VERSION" }   The default URLS are used to communicate with the Scout Server.
PLUGIN_TIMEOUT = 60   A plugin cannot take more than PLUGIN_TIMEOUT seconds to execute, otherwise, a timeout error is generated.
RUN_DELTA = 30   A fuzzy range of seconds in which it is okay to rerun a plugin. We consider the interval close enough at this point.

Public Class methods

Public Instance methods

Loads the history file from disk. If the file does not exist, it creates one.

Retrieves the Plugin Plan from the server. This is the list of plugins to execute, along with all options.

This is the heart of Scout.

First, it determines if a plugin is past interval and needs to be run. If it is, it simply evals the code, compiling it. It then loads the plugin and runs it with a PLUGIN_TIMEOUT time limit. The plugin generates data, alerts, and errors. In addition, it will set memory and last_run information in the history file.

Runs all plugins from a given plan. Calls process_plugin on each plugin.

Saves the history file to disk.

Sends report data to the Scout Server.

test()

Alias for plan

[Validate]