"HowTo" Posts

How To Customize a Scout Plugin

By Derek Bullet_white Posted in HowTo Bullet_white Comments Comments

Since Scout Plugins are open source, it’s easy to modify them to fit your needs.

Here’s a quick way to create a custom version of a Scout plugin.

1. Grab the current plugin and options

The code:

curl http://plugins.scoutapp.com/mongrel_cluster_monitor/trunk/mongrel_cluster_monitor.rb \ 
> mongrel_cluster_monitor.rb

The options:

curl http://plugins.scoutapp.com/mongrel_cluster_monitor/trunk/mongrel_cluster_monitor.yml \ 
> mongrel_cluster_monitor.yml

2. Edit the plugin code and test

scout -p /path/to/customized/mongrel_cluster_monitor.rb \
-o '{"mongrel_cluster_configuration_dir"=>"/etc/mongrel_cluster"}' \
-v -l debug

That says, use the -p option (or --plugin) and the -o (or --option) to test locally, passing these options, be verbose (--verbose) and set the log level to debug (--log-level debug).

Note that you could also add your own “option” there, as the path to one of the configuration files…. however you want to do it.

3. Host the Plugin

Scout ~ Bristol

Then, all you have to do is make that plugin and its options file (of the same name) URL accessible (put it in your rails public dir, perhaps, or on another server) for the scout server to be able to grab it when you install. When you install, choose, Manual—and type in the URL to your new customized version (http://highgroove.com/new_customized_single_mongrel.rb for example).

More on creating plugins


Recording Historical Data in Scout

By Derek Bullet_white Posted in HowTo Bullet_white Comments Comments

By default, when you create a report in Scout, we assume that the data corresponds to the time the report was submitted.

Sometimes this isn’t the case – for example, you can retrieve the number of subscribers to your RSS feeds in Feedburner, but not from the current day.

You can override the time Scout records the data in a Plugin with the special :scout_time report key.

Here’s an example:

# typical report data 
{:circulation => 1000}

# correspond the data w/ February 24, 2008
{:circulation => 1000, :scout_time => Time.parse("2/24/08")}

When displaying the data on a graph, the data will be shown on 2/24 and not the current date:

Scout ~ Derek Laptop

Learn more about creating Scout Plugins


Older posts: 1 ... 4 5 6