livingsocial / rearview

Timeseries data monitoring framework
Other
281 stars 31 forks source link

Verify Configuration fails for rearview-1.1.1 #22

Closed atulkhaire closed 10 years ago

atulkhaire commented 10 years ago

Hi,

I am successful in setting up rearview-1.1.1 on ubuntu. I updated the rearview.rb file and ran this command for verifying configuration.

$ rake RAILS_ENV=production rearview:config:verify

output:

using "production" configuration: authentication={:strategy=>:database} default_from=xyz@abc.com default_url_options={:host=>"localhost", :port=>"3000"} enable_alerts=false enable_monitor=false enable_stats=false graphite_url=https://www.hostedgraphite.com/access-key logger=#ActiveSupport::Logger:0x5e7cae4e pagerduty_url=https://events.pagerduty.com/generic/2010-04-15/create_event.json preload_jobs=false sandbox_dir=/opt/rearview-1.1.1/sandbox sandbox_exec=["rvm-exec", "ruby-1.9.3@rearview-sandbox", "ruby"] sandbox_timeout=10 statsd_connection=nil verify=false validating...FAILED Graphite url is not a reachable URL

I am using Jruby-1.7.10 and no other ruby version. when I run ruby -v I get this:

jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b on OpenJDK 64-Bit Server VM 1.7.0_51-b00 [linux-amd64]

Not sure if the value of sandbox_exec is correct.

talbright commented 10 years ago

So we can close issue #18?

atulkhaire commented 10 years ago

Yes Trent issue #18 can be closed now. Also can you give me idea about where to set SMTP credentials such as SMTP_HOST, SMTP_USERNAME, SMTP_PASSOWRD, SMTP_PORT for sending email. I am actually using Amazon SES.

talbright commented 10 years ago

The URL https://www.hostedgraphite.com/access-key isn't a valid graphite installation from what I can tell. This should be the actual graphite server.

SMTP settings are configured via rails. See this guide: http://guides.rubyonrails.org/action_mailer_basics.html

atulkhaire commented 10 years ago

Trent, Can you help me out on setting up value for 'config.sandbox_exec'. Now I have both Jruby-1.7.10 and ruby-1.9.3 installed. ruby -v gives me jruby 1.7.10 (1.9.3p392) 2014-01-09 c4ecd6b on OpenJDK 64-Bit Server VM 1.7.0_51-b00 [linux-amd64]

what should I set the sandbox_exec to ?

when I ran foreman start, application started on localhost:3000. After entering metric in the metric field when I clicked on Test Monitor, I got this error in the output field:

Cannot run program "/usr/local/rvm/gems/ruby-1.9.3@rearview-sandbox/bin" (in directory "/opt/rearview-1.1.1/sandbox"): error=2, No such file or directory

I have set config.sandbox_exec = ["/usr/local/rvm/gems/ruby-1.9.3@rearview-sandbox/bin"] .

talbright commented 10 years ago

The config.sandbox_exec has to point to the ruby executable, you left that off (you only have it pointing to the directory):

config.sandbox_exec = ["/path/ruby"]
atulkhaire commented 10 years ago

Hi Trent,

I had sorted out the issue related to config.sandbox_exec. Right now, config.sandbox_exec = ["/usr/local/rvm/rubies/ruby-1.9.3-p484/bin/ruby"] and the verification process says PASSED.

I am getting similar error as #23 . Here's the error message in the monitor's output field:

/usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/spec_set.rb:92:in block in materialize': Could not find json-1.8.0 in any of the sources (Bundler::GemNotFound) from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/spec_set.rb:85:inmap!' from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/spec_set.rb:85:in materialize' from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/definition.rb:133:inspecs' from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/definition.rb:178:in specs_for' from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/definition.rb:167:inrequested_specs' from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/environment.rb:18:in requested_specs' from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/runtime.rb:13:insetup' from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler.rb:119:in setup' from /usr/local/rvm/gems/jruby-1.7.10/gems/bundler-1.5.2/lib/bundler/setup.rb:17:in<top (required)>' from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in require' from /usr/local/rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:inrequire'

Before running foreman start I executed 'rvm use jruby' so that rvm uses jruby-1.7.10 instead of ruby-1.9.3

For ruby-1.9.3-p484, I tried to install gem 'json-1.8.0' but instead gem 'json-1.8.0-java' was installed and similar error was encountered.

talbright commented 10 years ago

Your solution should be similar to what @grimm26 had to do to fix #23

atulkhaire commented 10 years ago

Hi Trent, got it working. Thanks again.

ananthkollipara commented 10 years ago

Hi Trent, I ran into some setup issues. Can you please help?

Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
rake aborted!
Don't know how to build task 'rearview:setup'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/task_manager.rb:49:in `[]'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:142:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p545@rearview-sandbox/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

I have copied the output of the following.

$ which ruby $ ruby -v $ java -version $ which gem $ gem install bundler --no-rdoc --no-ri $ which bundle $ bundle install

[root@kodiak-SA2 rearview-1.2.0]# which ruby alias ruby='/usr/local/rvm/rubies/jruby-1.7.12/bin/ruby' /usr/local/rvm/rubies/jruby-1.7.12/bin/ruby

[root@kodiak-SA2 rearview-1.2.0]# ruby -v jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on OpenJDK 64-Bit Server VM 1.6.0_20-b20 [linux-amd64]

[root@kodiak-SA2 rearview-1.2.0]# java -version java version "1.6.0_20" OpenJDK Runtime Environment (IcedTea6 1.9.7) (rhel-1.39.1.9.7.el6-x86_64) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

[root@kodiak-SA2 rearview-1.2.0]# which gem /usr/local/rvm/rubies/ruby-1.9.3-p545/bin/gem

[root@kodiak-SA2 rearview-1.2.0]# gem install bundler --no-rdoc --no-ri Fetching: bundler-1.6.2.gem (100%) Successfully installed bundler-1.6.2 1 gem installed

[root@kodiak-SA2 rearview-1.2.0]# which bundle /usr/local/rvm/gems/ruby-1.9.3-p545/bin/bundle

[root@kodiak-SA2 rearview-1.2.0]# cd sandbox/ [root@kodiak-SA2 sandbox]# cd .. jruby-1.7.5 is not installed. To install do: 'rvm install jruby-1.7.5'

[root@kodiak-SA2 rearview-1.2.0]# bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Using rake 10.0.4 Using i18n 0.6.9 Using minitest 4.7.5 Using multi_json 1.9.2 Using thread_safe 0.3.3 Using tzinfo 0.3.39 Using activesupport 4.0.2 Using builder 3.1.4 Using erubis 2.7.0 Using rack 1.5.2 Using rack-test 0.6.2 Using actionpack 4.0.2 Using mime-types 1.25.1 Using polyglot 0.3.4 Using treetop 1.4.15 Using mail 2.5.4 Using actionmailer 4.0.2 Using activemodel 4.0.2 Using activerecord-deprecated_finders 1.0.3 Using arel 4.0.2 Using activerecord 4.0.2 Using bcrypt 3.1.7 Using coderay 1.1.0 Using coffee-script-source 1.7.0 Using execjs 2.0.2 Using coffee-script 2.2.0 Using thor 0.19.1 Using railties 4.0.2 Using coffee-rails 4.0.1 Using orm_adapter 0.5.0 Using warden 1.2.3 Using devise 3.2.4 Using diff-lcs 1.2.5 Using dotenv 0.7.0 Using multipart-post 2.0.0 Using faraday 0.9.0 Using foreman 0.64.0 Using hashie 2.1.1 Using hike 1.2.3 Using jbuilder 1.5.3 Using jquery-rails 3.1.0 Using json 1.8.1 Using jwt 0.1.11 Using libv8 3.16.14.3 Using method_source 0.8.2 Using multi_xml 0.5.5 Using mysql 2.9.1 Using oauth2 0.9.3 Using omniauth 1.2.1 Using omniauth-oauth2 1.1.2 Using omniauth-google-oauth2 0.2.3 Using slop 3.5.0 Using pry 0.9.12.6 Using puma 2.8.2 Using bundler 1.6.2 Using tilt 1.4.1 Using sprockets 2.11.0 Using sprockets-rails 2.0.1 Using rails 4.0.2 Using rdoc 4.1.1 Using ref 1.0.5 Using rspec-core 2.14.8 Using rspec-expectations 2.14.5 Using rspec-mocks 2.14.6 Using rspec-rails 2.14.2 Using sass 3.2.19 Using sass-rails 4.0.3 Using sdoc 0.4.0 Using therubyracer 0.12.1 Using therubyrhino_jar 1.7.4 Using therubyrhino 2.0.3 Using turbolinks 2.2.2 Using uglifier 2.5.0 Updating files in vendor/cache Your bundle is complete! Use bundle show [gemname] to see where a bundled gem is installed. [root@kodiak-SA2 rearview-1.2.0]#

ananthkollipara commented 10 years ago

Hi Trent, Can i expect some help here? Am waiting..thanks

talbright commented 10 years ago

While you do have jruby installed, you can see in the output that the 'gem' and 'bundle' commands are running from the MRI ruby, not from jruby.

I would recommend using a ruby version manager like rvm or rbenv.

ananthkollipara commented 10 years ago

yes, am using rvm. Shall i set the the alias for bundle & gem too, to use jruby's 'gem' and 'bundle'

[root@kodiak-SA2 rearview-1.2.0]# alias ruby alias ruby='/usr/local/rvm/rubies/jruby-1.7.12/bin/ruby'

ananthkollipara commented 10 years ago

Trent - I had set 'rvm use jruby-1.7.12'.

[root@kodiak-SA2 rearview-1.2.0]# which gem
/usr/local/rvm/rubies/jruby-1.7.12/bin/gem
[root@kodiak-SA2 rearview-1.2.0]# which bundle
/usr/local/rvm/gems/jruby-1.7.12/bin/bundle

And then executed /bin/setup..i see the following errors.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/jruby-1.7.12/bin/jruby extconf.rb
/usr/local/rvm/rubies/jruby-1.7.12/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config.
mkmf.rb can't find header files for ruby at /usr/local/rvm/rubies/jruby-1.7.12/lib/native/include/ruby/ruby.h

extconf failed, uncaught signal 1

Gem files will remain installed in /usr/local/rvm/gems/jruby-1.7.12/gems/mysql-2.9.1 for inspection.
Results logged to /usr/local/rvm/gems/jruby-1.7.12/extensions/universal-java-1.6/1.9/mysql-2.9.1/gem_make.out
An error occurred while installing mysql (2.9.1), and Bundler cannot continue.
Make sure that `gem install mysql -v '2.9.1'` succeeds before bundling.
Setting up sandbox...
Successfully installed bundler-1.6.2
1 gem installed
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Using i18n 0.6.5
Using json 1.8.0
Using multi_json 1.8.1
Using bundler 1.6.2
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
Could not find mysql-2.9.1 in any of the sources
Run `bundle install` to install missing gems.

Below is my gem environment...

[root@kodiak-SA2 rearview-1.2.0]# gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.2
  - RUBY VERSION: 1.9.3 (2014-04-15 patchlevel 392) [java]
  - INSTALLATION DIRECTORY: /usr/local/rvm/gems/jruby-1.7.12
  - RUBY EXECUTABLE: /usr/local/rvm/rubies/jruby-1.7.12/bin/jruby
  - EXECUTABLE DIRECTORY: /usr/local/rvm/gems/jruby-1.7.12/bin
  - SPEC CACHE DIRECTORY: /root/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-java-1.6
  - GEM PATHS:
     - /usr/local/rvm/gems/jruby-1.7.12
     - /usr/local/rvm/gems/jruby-1.7.12@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--no-rdoc --no-ri"
     - "update" => "--no-rdoc --no-ri"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/rvm/gems/jruby-1.7.12/bin
     - /usr/local/rvm/gems/jruby-1.7.12@global/bin
     - /usr/local/rvm/rubies/jruby-1.7.12/bin
     - /usr/local/rvm/bin
     - /usr/lib64/qt-3.3/bin
     - /usr/local/bin
     - /bin
     - /usr/bin
     - /usr/local/sbin
     - /usr/sbin
     - /sbin
     - /home/kodiak/bin
talbright commented 10 years ago

Try going to the root of the project and running:

$ bundle exec rake RAILS_ENV=production rearview:setup

ananthkollipara commented 10 years ago

Trent - I see the below errors.

[root@kodiak-SA2 rearview-1.2.0]# bundle exec rake RAILS_ENV=production rearview:setup
Could not find mysql-2.9.1 in any of the sources
Run `bundle install` to install missing gems.

[root@kodiak-SA2 rearview-1.2.0]# mysql -i
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1076
Server version: 5.1.52 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+---------------------+
| Database            |
+---------------------+
| information_schema  |
| graphite            |
| mysql               |
| rearview_production |
| test                |
+---------------------+
ananthkollipara commented 10 years ago

I also executed 'bundle install'. Do i need to get rid of some gems that are not required?

[root@kodiak-SA2 rearview-1.2.0]# bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from http://rubygems.org/.......
Fetching additional metadata from http://rubygems.org/..
Resolving dependencies...
Using rake 10.3.1
Using i18n 0.6.9
Using minitest 4.7.5
Using multi_json 1.9.2
Using thread_safe 0.3.3
Using tzinfo 0.3.39
Using activesupport 4.0.2
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.0.2
Using mime-types 1.25.1
Using polyglot 0.3.4
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.0.2
Using activemodel 4.0.2
Using activerecord-deprecated_finders 1.0.3
Using arel 4.0.2
Using activerecord 4.0.2
Using activerecord-jdbc-adapter 1.3.7
Using jdbc-mysql 5.1.30
Using activerecord-jdbcmysql-adapter 1.3.7
Using jdbc-postgres 9.3.1101
Using activerecord-jdbcpostgresql-adapter 1.3.7
Using ancestry 2.0.0
Using bcrypt 3.1.7
Using bouncy-castle-java 1.5.0147
Using nap 0.7.0
Using broach 0.3.0
Using bundler 1.6.2
Using hitimes 1.2.1
Using timers 2.0.0
Using celluloid 0.14.1
Using coderay 1.1.0
Using coffee-script-source 1.7.0
Using execjs 2.0.2
Using coffee-script 2.2.0
Using thor 0.19.1
Using railties 4.0.2
Using coffee-rails 4.0.1
Using orm_adapter 0.5.0
Using warden 1.2.3
Using devise 3.2.4
Using diff-lcs 1.2.5
Using dotenv 0.7.0
Using multipart-post 2.0.0
Using faraday 0.9.0
Using ffi 1.9.3
Using foreman 0.64.0
Using hashie 2.1.1
Using hike 1.2.3
Using json 1.8.1
Using multi_xml 0.5.5
Using httparty 0.12.0
Using jbuilder 1.5.3
Using jquery-rails 3.1.0
Using jruby-openssl 0.9.4
Using jwt 0.1.11
Using method_source 0.8.2

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/jruby-1.7.12/bin/jruby extconf.rb
/usr/local/rvm/rubies/jruby-1.7.12/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config.
mkmf.rb can't find header files for ruby at /usr/local/rvm/rubies/jruby-1.7.12/lib/native/include/ruby/ruby.h

extconf failed, uncaught signal 1

Gem files will remain installed in /usr/local/rvm/gems/jruby-1.7.12/gems/mysql-2.9.1 for inspection.
Results logged to /usr/local/rvm/gems/jruby-1.7.12/extensions/universal-java-1.6/1.9/mysql-2.9.1/gem_make.out
An error occurred while installing mysql (2.9.1), and Bundler cannot continue.
Make sure that `gem install mysql -v '2.9.1'` succeeds before bundling.
ananthkollipara commented 10 years ago

Trent - Sorry to bother you. Any advise here?

ananthkollipara commented 10 years ago

Trent - After updating the Gemfile with -> gem 'activerecord-jdbcmysql-adapter', platform: :jruby, installation went through. Thanks.

ananthkollipara commented 10 years ago

Trent - Please, I require your help here.

1) My metrics: servers.prod.xyz
2) My expression: puts @timeseries
xyz = @a.values.sum
raise "call failures is high !!" if xyz > 1
3) $whisper-fetch.py /idata/gp/whisper/servers/prod/xyz.wsp
1398348240      50.000000
1398348300      25.000000
4) On hitting "Test Monitor"
I, [2014-04-24T14:11:23.409000 #29980]  INFO -- : Started POST "/monitor.json" for 192.168.15.21 at 2014-04-24 14:11:23 UTC
I, [2014-04-24T14:11:23.429000 #29980]  INFO -- : Processing by Rearview::MonitorController#create as JSON
I, [2014-04-24T14:11:23.430000 #29980]  INFO -- :   Parameters: {"id"=>"", "dashboardId"=>"1", "userId"=>"1", "name"=>"POC Calls Monitor", "active"=>"true", "jobType"=>"monitor", "version"=>"2", "cronExpr"=>"0 * * * * ?", "errorTimeout"=>"60", "minutes"=>"1", "metrics"=>["servers.prod.xyz"], "monitorExpr"=>"puts @timeseries\nxyz = @a.values.sum\nraise \"call failures is high !!\" if xyz > 1", "toDate"=>"now", "createdAt"=>"", "modifiedAt"=>"", "description"=>"This is a PoC Call Monitor"}
D, [2014-04-24T14:11:23.436000 #29980] DEBUG -- :   Rearview::User Load (1.0ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 ORDER BY `users`.`id` ASC LIMIT 1
D, [2014-04-24T14:11:23.641000 #29980] DEBUG -- : Rearview::MonitorRunner run
D, [2014-04-24T14:11:23.642000 #29980] DEBUG -- : Rearview::MonitorRunner fetch_data
D, [2014-04-24T14:11:23.642000 #29980] DEBUG -- : Rearview::MonitorRunner#create_from_to_dates minutes:1 to_date:now
D, [2014-04-24T14:11:23.643000 #29980] DEBUG -- : Rearview::MonitorRunner#create_from_to_dates from:14:09_20140424 to:14:10_20140424
I, [2014-04-24T14:11:23.693000 #29980]  INFO -- :   Rendered /usr/local/rvm/gems/jruby-1.7.12/gems/rearview-1.2.1-java/app/views/rearview/monitor/create.json.jbuilder (1.0ms)
I, [2014-04-24T14:11:23.694000 #29980]  INFO -- : Completed 200 OK in 264ms (Views: 4.0ms | ActiveRecord: 1.0ms)

5) I see "Monitor Test Error!" on the screen. Can you please let me know what is the issue here?
ananthkollipara commented 10 years ago

Trent - I see the data available via graphite (render), but not via rearview. Can you please assist? I can check on those lines. Am awaiting your response.

ananthkollipara commented 10 years ago

Trent,

While trying to debug with pry, the session hangs here...

# rvm use jruby
Using /usr/local/rvm/gems/jruby-1.7.12

#foreman start
file:/usr/local/rvm/rubies/jruby-1.7.12/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: err
file:/usr/local/rvm/rubies/jruby-1.7.12/lib/jruby.jar!/jruby/kernel19/process.rb:13 warning: unsupported spawn option: out
14:28:44 web.1  | started with pid 508
=> Booting Puma
=> Rails 4.0.2 application starting in production on http://192.168.15.241:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server

From: /usr/local/rvm/gems/jruby-1.7.12/gems/rearview-1.2.1-java/app/controllers/rearview/monitor_controller.rb @ line 3 :

    1: require 'pry'
    2:
 => 3: binding.pry
    4:
    5: module Rearview
    6:   class MonitorController < Rearview::ApplicationController
    7:
    8:     before_action only: [:create] do

Can you please let me know, what is wrong with the environment?

talbright commented 10 years ago

Check out the procfile and start the service(s) manually without using foreman. This should prevent pry from hanging while debugging.

ananthkollipara commented 10 years ago

Trent - With pry, pry-nav gem, am able to navigate thru the debugger. Am stuck in identifying the issue. a) i see the data via graphite GUI b) while debugging, i see that rearview is unable to get the same data

[1] pry(Rearview::MonitorRunner)> p params {"from"=>"13:43_20140509", "until"=>"13:44_20140509", "format"=>"raw", "target"=>["alias(servers.prod.test, \"test\")"]} => {"from"=>"13:43_20140509", "until"=>"13:44_20140509", "format"=>"raw", "target"=>["alias(servers.prod.test, \"test\")"]}

..... ..... D, [2014-05-09T13:50:20.448000 #10537] DEBUG -- : monitor_output obj:: {:status=>"error", :output=>nil, :graph_data=>nil}

Any advice, where things are going wrong, please comment.

ananthkollipara commented 10 years ago

Trent - I see that no data is returned in fetch_data function of monitor_runner.rb?

 begin
          data = fetch_data(metrics, minutes, to_date)
          binding.pry
          if !data.empty?

hence the below error...

D, [2014-05-09T15:07:54.011000 #19984] DEBUG -- :  monitor_output obj:: {:status=>"error", :output=>nil, :graph_data=>nil}

Any fix is available for this??