How To Customize a Scout Plugin

May 08, 2008 by Charles

Posted in HowTo | no 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

Comments

(leave url/email »)

  

Featured Plugins

  • Ruby on Rails Instrumentation
    NEW for Scout 2.0! This plugin monitors a Ruby on Rails Application, providing deep analysis of application performance, MySQL optimization hints and breakdowns on individual actions.
  • Process Usage
    Monitors the memory usage of a process, generating an alert if it exceeds a specified threshold.
  • URL Monitoring
    Monitors the availability of a URL, sending an alert if the URL is not reachable.
  • Server Load
    Monitors the load on server, generating an alert if the load over the last minute is greater than a specified amount.


Categories

Already have a Scout account?   Where do I login? Highgroove Studios Powered By Rails Machine