On Sinatra

By Derek Bullet_white Comments Comments

Sinatra, a Ruby DSL for quickly creating web applications with minimal effort, forms a key part of the Scout infrastructure.

James Gray talks about how we use Sinatra at Scout via RubyLearning.org – 20+ Rubyists are using Sinatra – Do you?

For more on how Scout works:

 

Rails Machine selects Scout for Performance Monitoring

By Derek Bullet_white Comments Comments

Rails Machine, one of the first specialized Rails hosting providers, has selected Scout for performance monitoring.

Why Scout? “Scout’s versatility was a key benefit: “the open-source plugins are the killer app of Monitoring,” says Rails Machine CEO Bradly Taylor. “We have so much flexibilty—and we’ll be contributing some great plugins back to the community.”

“With Scout, we have the full picture – Rails, MySQL, CPU, Memory, IO, and Disk Usage – all in one dashboard. You can’t beat that,” said Jesse Newland, Senior Engineer at Rails Machine.

Rails Machine, which recently launched a Managed Hosting offering, finds Scout particularly useful for proactively managing customer accounts. “Scout’s trend detection have more than once caught an application’s jump in memory usage due to RMagick-based image uploads/resizes,” says Newland. “We’ve been able to jump in, restart Apache, and then proposing alternatives to customers. It’s much better than a server running out of a memory minutes later.”

Scout is included with Rails Machine’s new Managed Hosting service which does everything but write the code – from MySQL tuning to backups to performance monitoring. Self-managed customers can request a coupon for a free Basic Scout subscription or $14/off a larger plan. See the announcement on the Rails Machine blog for more details.

From the original five-minute Rails deployment gem, the Rails Machine gem, to Moonshine, an open source configuration management and deployment system, Rails Machine understands automating system administration. Combining Scout’s proactive approach to monitoring with Rails Machine’s encyclopedia-like knowledge-base for scaling Rails apps is a perfect combination for managed hosting.

 

A tour of Scout's Ruby on Rails Monitoring Plugin

By Derek Bullet_white Posted in Plugins Bullet_white Comments Comments

Curious how data moves from your Rails app to Scout? Wondering how Scout handles high-traffic Rails apps? Where does Scout add MySQL suggestions? How are alerts generated? I’ll guide you through the process below.

Logging each web request

At a basic level, Scout’s Rails benchmarking isn’t much different than what gets written to your Rails log. Instead of writing to a log file, the Scout Rails Instrumentation plugin sends a Hash to the Scout Agent like the one below:


{:num_requests=>2, :avg_request_time=>241.0, :actions=>
{"users/index"=>{:db_runtime_max=>156.152, 
:num_requests=>2, :render_runtime_avg=>8.59355926513672, :render_runtime_max=>8.73303413391113, 
:runtime_avg=>241.0, :other_runtime_avg=>77.4774407348633, 
:queries=>[[[156.152, 0]], [[153.706, 0]]], :runtime_max=>243.0, 
:other_runtime_max=>78.1149658660889, :db_runtime_avg=>154.929}}, 
:queries=>["SELECT * FROM \"users\""], 
:scout_time=>"Mon Jun 15 21:04:00 UTC 2009"}

These messages are sent to the Scout Agent every 30 seconds by the Scout#Reporter.report! method:


response = ScoutAgent::API.queue_for_mission(Scout.config[:plugin_id], report)

Read More →

 

It's very easy to create a Scout plugin

By Andre Bullet_white Posted in HowTo Bullet_white Comments 1 comment

How easy? Really easy. There are just two things you need to know to get started:

1. Starting the Agent in test mode

The agent sports a nifty autotest-like mode to help you quickly iterate new plugin code. To start:

scout_agent test my_new_plugin.rb

With that, the agent is watching my_new_plugin.rb, just waiting for you to hit save so it can come to life. Whenever you modify the target file, the Agent will immediately log to console the results of your plugin-in-progress.

2. The basic format of a plugin

Keeping this very simple—a plugin looks like this:

class ExampleReport < Scout::Plugin
  def build_report
    report(:minute=>Time.now.min)
  end
end

Yeah, that’s a simple case all right. It just reports the minute every time it runs, so it will generate a single data series with a value between 0 and 59.

If you haven’t created a plugin before, I encourage you to try this very simple example. It will take you approximately two minutes, and you’ll see how easy the Agent’s test mode makes it to iterate.

Go a little deeper

There’s more: generating alerts, reading from option files, etc. When you’re ready, check out the developer documentation at https://scoutapp.com/info/creating_a_plugin

 

Learn about the Scout Agent, API, and more at OK.rb

By Derek Bullet_white Comments Comments

James will be speaking at Thursday’s (June 11th) Ok.rb meetup in Edmond, Oklahoma, giving a tour of the Scout Agent and the API.

See the Ok.rb website for more details.

 

Now with deep Rails Instrumentation, triggers, a more robust agent, and more

By Derek Bullet_white Posted in Updates Bullet_white Comments 2 comments

Scout is nearing 1/2 billon recorded metrics, but bragging about metrics is like bragging about the number of lines of code you’ve written. Metrics, like code, are a means to an end. It’s the quality, not the volume, that matters.

We took a big step in going beyond numbers today with the release of the Rails instrumentation plugin for Scout. It’s the first plugin to leverage Scout’s new features, and at just $7/server, we think it’s at a price that makes sense whether you have a small VPS or a cloud of servers.

A quick tour of Scout’s new features:

Deep Rails Instrumentation Plugin

Using the new Rails instrumentation plugin, you’ll get alerted of trends. Scout wants to help you correct and issue before it becomes a problem:

skitched-10

When things go wrong, Scout tries to lend a helping hand, giving optimization suggestions:

skitched-20090526-134916.png

..and highlights the variables that changed the most:

skitched-20090526-135015.png

Sometimes you just want an overview of your Rails application as well:

skitched-20090526-144311.png

The Rails Instrumentation plugin is open source, like the rest of our plugins. View the source of the Rails plugin and its companion Scout plugin on GitHub.

Triggers

Leverage the same alerting functionality used by the Deep Rails instrumentation plugin in your own plugins with triggers. For example, let Scout notify you if user signups dramatically increase compared to the previous 7 days. Just pick a metric and set the thresholds!

The new Scout Agent

The old cron-based Scout client has been replaced by the Scout Agent, a daemon. The Scout Agent is an easier install and enables the more powerful and flexible metric-collecting goodness used by the Rails instrumentation plugin.

View the Scout Agent source at GitHub.

An easier API

It’s even easier to get your data into Scout with the new Ruby API:

ScoutAgent::API.queue_report({:metric_name => value, :plugin_id => PLUGIN_ID})

Or just use JSON from the command line:

scout_agent q report <<< ‘{“new_users”: 12}’

View our Developer Resources for more information on integrating with Scout.

Just $7/server

You can get started today with a free 30 day trial.

 

Older posts: 1 ... 54 55 56 57 58 ... 68