<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -8,10 +8,10 @@ metadata:
 
 triggers:
   - type: peak
-    data_series_name: last_minute
+    dname: last_minute
     max_value: 3
   - type: trend
-    data_series_name: last_minute
+    dname: last_minute
     direction: UP
     percentage_change: 60
     duration: 60</diff>
      <filename>load_averages/load_averages.yml</filename>
    </modified>
    <modified>
      <diff>@@ -21,11 +21,11 @@ metadata:
     
 triggers:
   - type: peak
-    data_series_name: % Swap Used
+    dname: % Swap Used
     max_value: 50
   # swap usage increases by 30% compared to last week
   - type: trend
-    data_series_name: % Swap Used
+    dname: % Swap Used
     direction: UP
     percentage_change: 30
     duration: 60</diff>
      <filename>memory_profiler/memory_profiler.yml</filename>
    </modified>
    <modified>
      <diff>@@ -33,7 +33,7 @@ metadata:
 
 triggers:    
   - type: trend
-    data_series_name: total
+    dname: total
     direction: UP                            
     percentage_change: 30                    
     duration: 60                           </diff>
      <filename>mysql_monitoring/mysql_monitoring.yml</filename>
    </modified>
    <modified>
      <diff>@@ -2,24 +2,29 @@ class ProcessUsage &lt; Scout::Plugin
   MEM_CONVERSION = 1024
   
   def build_report
-    if @options[&quot;command_name&quot;].nil? or @options[&quot;command_name&quot;] == ''
-      return error(:subject =&gt; &quot;Please specify the name of the process you want to monitor.&quot;)
+    if @options[&quot;command_name&quot;].nil? or @options[&quot;command_name&quot;] == &quot;&quot;
+      return error(&quot;Please specify the name of the process you want to monitor.&quot;)
+    end
+    ps_command   = @options[&quot;ps_command&quot;] || &quot;ps axucww&quot;
+    ps_regex     = (@options[&quot;ps_regex&quot;] || &quot;(?i:COMMAND\\s+$)&quot;).to_s.
+                   gsub(&quot;COMMAND&quot;, Regexp.escape(@options[&quot;command_name&quot;]))
+    begin
+      ps_output    = `#{ps_command}`
+    rescue
+      error(&quot;Couldn't use `ps` as expected.&quot;, $!.message)
     end
-    ps_command   = @options['ps_command'] || &quot;ps axucww&quot;
-    ps_output    = `#{ps_command}`
     fields       = ps_output.to_a.first.downcase.split
-    memory_index = fields.index(&quot;rss&quot;)
+    memory_index = fields.index(&quot;rss&quot;) or
+      return error( &quot;RSS field not found.&quot;,
+                    &quot;The output from `#{ps_command}` did not include the needed RSS field.&quot; )
     highest      =
-      ps_output.grep(/#{Regexp.escape(@options[&quot;command_name&quot;])}\s+$/i).
+      ps_output.grep(Regexp.new(ps_regex)).
                 map { |com| Float(com.split[memory_index]).abs }.max
     if highest
-      report(:memory  =&gt; (highest/MEM_CONVERSION).to_i)
+      report(:memory =&gt; (highest/MEM_CONVERSION).to_i)
     else
-      error(:subject =&gt; &quot;Command not found.&quot;,
-            :body    =&gt; &quot;No processes found matching #{@options['command_name']}.&quot;)
+      error( &quot;Command not found.&quot;,
+             &quot;No processes found matching #{@options['command_name']}.&quot; )
     end
-  rescue
-    error(:subject =&gt; &quot;Couldn't use `ps` as expected.&quot;,
-          :body    =&gt; $!.message)
   end
 end</diff>
      <filename>process_memory/process_usage.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,10 @@ options:
     name: The Process Status (ps) Command
     notes: The command with options. The default works on most systems.
     default: ps axucww
+  ps_regex:
+    name: The regex used to match a command name.
+    notes: &quot;By default, this matches a command with options at the end of a line.  The word COMMAND get's replaced with the command you gave (regex escaped).  You may wish to try the following pattern if you have trouble matching dynamic options:  (?i:\\bCOMMAND\\b)&quot;
+    default: &quot;(?i:COMMAND\\s+$)&quot;
     
 metadata:
   memory:          
@@ -16,10 +20,10 @@ metadata:
     
 triggers:
   - type: peak
-    data_series_name: memory
+    dname: memory
     max_value: 10
   - type: trend
-    data_series_name: memory
+    dname: memory
     direction: UP
     percentage_change: 20
     duration: 60</diff>
      <filename>process_memory/process_usage.yml</filename>
    </modified>
    <modified>
      <diff>@@ -188,9 +188,9 @@ class RailsAnalyzer
           duration=query.duration.to_i
           if query.explain_issues? # slow &amp; explain issues. we can give more details.
             importance = 0
-            importance += 1 if duration &gt; 100
-            importance += 1 if duration &gt; 200
-            importance += 1 if duration &gt; 300
+            importance += 1 if duration &gt; 600
+            importance += 1 if duration &gt; 900
+            importance += 1 if duration &gt; 1200
             importance = 3 if importance &gt; 3 # importance maxes out at 3
             add_hint(
                   :title =&gt; &quot;A #{duration}ms query in the #{query.table} table may be able to be optimized.&quot;,
@@ -205,9 +205,9 @@ class RailsAnalyzer
           else # just slow
             # calculate importance
             importance = 0
-            importance += 1 if duration &gt; 100
-            importance += 1 if duration &gt; 200
-            importance += 1 if duration &gt; 300
+            importance += 1 if duration &gt; 600
+            importance += 1 if duration &gt; 900
+            importance += 1 if duration &gt; 1200
             add_hint(
                   :title =&gt; &quot;A slow query occurred (#{duration} ms).&quot;,
                   :description =&gt; &quot;This query exceeds the maximum specified duration of #{MAX_QUERY_TIME}ms.&quot;,</diff>
      <filename>rails_instrumentation/rails_instrumentation.rb</filename>
    </modified>
    <modified>
      <diff>@@ -71,14 +71,14 @@ metadata:
 #
 #triggers:
 #  - type: peak
-#    data_series_name: throughput             # a shallow data series
+#    dname: throughput             # a shallow data series
 #    max_value: 200
 #  - type: plateau
-#    data_series_name: actions.runtime_max    # a deep data series
+#    dname: actions.runtime_max    # a deep data series
 #    max_value: 1000
 #    duration: 10                             # in minutes
 #  - type: trend
-#    data_series_name: actions.runtime_avg
+#    dname: actions.runtime_avg
 #    direction: UP                            # UP, DOWN, EITHER
 #    percentage_change: 10                    # greater than 0
 #    duration: 120                            # a number (in minutes) or: DAY_SO_FAR
@@ -86,10 +86,10 @@ metadata:
 
 triggers:
   - type: peak
-    data_series_name: actions.runtime_max
+    dname: actions.runtime_max
     max_value: 4000
   - type: trend
-    data_series_name: actions.runtime_avg
+    dname: actions.runtime_avg
     direction: UP
     percentage_change: 30
     duration: 120</diff>
      <filename>rails_instrumentation/rails_instrumentation.yml</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,7 @@ class UrlMonitor &lt; ScoutAgent::Plugin
   TIMEOUT_LENGTH = 50 # seconds
   
   def build_report
+    @options[&quot;url&quot;] =&quot;http://hotspotr.com/app/ping_&quot;
     if @options[&quot;url&quot;].strip.length == 0
       return error(:subject =&gt; &quot;A url wasn't provided.&quot;)
     end</diff>
      <filename>url_monitor/url_monitor.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5bb58ea082496cbbef5f8d1bb0d84a2a82b0297a</id>
    </parent>
    <parent>
      <id>91d81476b47e3cd629d42a2e536f889c7c8407d6</id>
    </parent>
  </parents>
  <author>
    <name>James Edward Gray II</name>
    <email>james@graysoftinc.com</email>
  </author>
  <url>http://github.com/highgroove/scout-plugins/commit/e78990370c927c87c72a2bb6c4fe3b9a0e637997</url>
  <id>e78990370c927c87c72a2bb6c4fe3b9a0e637997</id>
  <committed-date>2009-05-08T15:57:14-07:00</committed-date>
  <authored-date>2009-05-08T15:57:14-07:00</authored-date>
  <message>Merge branch 'agent_compatible'</message>
  <tree>c5afeee5342959eac0b40925e07b2e2bf83aa439</tree>
  <committer>
    <name>James Edward Gray II</name>
    <email>james@graysoftinc.com</email>
  </committer>
</commit>
