Sha256: 73544d5122d6e5d098efef404814091432ae973296fdd2760774c1616255a79a

Contents?: true

Size: 1.31 KB

Versions: 132

Compression:

Stored size: 1.31 KB

Contents

#!/usr/bin/env ruby
require 'rubygems'
require 'rack'
require 'rack/handler/mongrel'
require 'optparse'

port = 3000
options = { }
appname = nil
OptionParser.new do |opts|
  opts.banner = "Usage: #{File.basename($0)} [options] [app_name]"
  opts.on("-p", "--port=port", Integer, "default: #{port}") { | port | }
  opts.on("--[no-]logging", "turn off request logging" ) { | l | options[:logging] = l }
  opts.on("--license=license_key", "override license key" ) { | l | options[:license_key] = l }
  opts.on("--install", "install a newrelic.yml template" ) { | l | options[:install] = true }
  opts.separator ""
  opts.separator "app_name is the name of the application where the metrics will be stored"
  opts.separator ""
  # The rackup file references this var
  appname = opts.parse!(ARGV.clone).first
end

options[:app_name] = appname if appname

ru_file = File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "new_relic", "rack", "mongrel_rpm.ru"))
rackup_code = File.read ru_file
builder = Rack::Builder.new { eval rackup_code, binding, ru_file }

options = { :Host => '127.0.0.1', :Port => port }
Rack::Handler::Mongrel.run(builder.to_app, options) do | server |
  NewRelic::Agent.logger.info "Started Mongrel listening for '#{NewRelic::Control.instance.app_names.join(" and ")}' data at #{server.host}:#{server.port}" 
end

Version data entries

132 entries across 132 versions & 4 rubygems

Version Path
newrelic_rpm-3.13.0.299 bin/mongrel_rpm
newrelic_rpm-3.12.1.298 bin/mongrel_rpm
newrelic_rpm-3.12.0.288 bin/mongrel_rpm
newrelic_rpm-3.11.2.286 bin/mongrel_rpm
newrelic_rpm-3.11.1.284 bin/mongrel_rpm
newrelic_rpm-3.11.0.283 bin/mongrel_rpm
newrelic_rpm-3.10.0.279 bin/mongrel_rpm
newrelic_rpm-3.9.9.275 bin/mongrel_rpm
newrelic_rpm-3.9.8.273 bin/mongrel_rpm
newrelic_rpm-3.9.7.266 bin/mongrel_rpm
newrelic_rpm-3.9.6.257 bin/mongrel_rpm
newrelic_rpm-3.9.5.251 bin/mongrel_rpm
newrelic_rpm-3.9.4.245 bin/mongrel_rpm
newrelic_rpm-3.9.3.241 bin/mongrel_rpm
newrelic_rpm-3.9.2.239 bin/mongrel_rpm
newrelic_rpm-3.9.1.236 bin/mongrel_rpm
newrelic_rpm-3.9.0.229 bin/mongrel_rpm
newrelic_rpm-3.8.1.221 bin/mongrel_rpm
newrelic_rpm-3.8.0.218 bin/mongrel_rpm
newrelic_rpm-3.7.3.204 bin/mongrel_rpm