riemann / riemann-dash

An HTTP dashboard for Riemann.
MIT License
248 stars 102 forks source link

Getting started #23

Closed haf closed 11 years ago

haf commented 11 years ago

Hi,

Can't get started, this happens when I GET /.

== Sinatra/1.4.2 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
NoMethodError - undefined method `query' for #<Riemann::Dash:0xb6e51814>:
        /usr/share/riemann-dash/index.erubis:2:in `__tilt_612990298'
        /usr/share/riemann-dash/index.erubis:8186:in `instance_eval'
        /usr/share/riemann-dash/index.erubis:8186:in `__tilt_612990298'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/tilt-1.3.6/lib/tilt/template.rb:144:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/tilt-1.3.6/lib/tilt/template.rb:144:in `evaluate'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/tilt-1.3.6/lib/tilt/template.rb:77:in `render'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:794:in `render'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:654:in `erb'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/riemann-dash-0.2.1/lib/riemann/dash/controller/index.rb:9:in `GET /'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1414:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1414:in `compile!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `[]'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `route!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:960:in `route_eval'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:944:in `route!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:981:in `process_route'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:979:in `catch'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:979:in `process_route'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:943:in `route!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:942:in `each'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:942:in `route!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1053:in `dispatch!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `invoke'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `catch'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `invoke'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1050:in `dispatch!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:878:in `call!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `invoke'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `catch'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1035:in `invoke'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:878:in `call!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:864:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/riemann-dash-0.2.1/lib/riemann/dash/rack/static.rb:9:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call
'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'

        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/showexceptions.rb:21:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:172:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1947:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1610:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1693:in `synchronize'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1610:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thin-1.5.1/lib/thin/connection.rb:81:in `pre_process'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thin-1.5.1/lib/thin/connection.rb:79:in `catch'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thin-1.5.1/lib/thin/connection.rb:79:in `pre_process'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `call'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `spawn_threadpool'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/eventmachine-1.0.3/lib/eventmachine.rb:1033:in `initialize'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/eventmachine-1.0.3/lib/eventmachine.rb:1033:in `new'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/eventmachine-1.0.3/lib/eventmachine.rb:1033:in `spawn_threadpool'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/eventmachine-1.0.3/lib/eventmachine.rb:1023:in `defer'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thin-1.5.1/lib/thin/connection.rb:51:in `process'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thin-1.5.1/lib/thin/connection.rb:39:in `receive_data'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thin-1.5.1/lib/thin/backends/base.rb:63:in `start'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/thin-1.5.1/lib/thin/server.rb:159:in `start'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:in `run'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/sinatra-1.4.2/lib/sinatra/base.rb:1569:in `run!'
        /opt/vagrant_ruby/lib/ruby/gems/1.8/gems/riemann-dash-0.2.1/bin/riemann-dash:7
        /opt/vagrant_ruby/bin/riemann-dash:19:in `load'
        /opt/vagrant_ruby/bin/riemann-dash:19
♥>> Stopping ...

== Sinatra has ended his set (crowd applauds)

Config:

set :bind, '0.0.0.0'
config[:views] = '/usr/share/riemann-dash/'

Using https://github.com/garethr/garethr-riemann

haf commented 11 years ago

So I followed the tutorial on the site instead, and while it still doesn't work like it should with the installations of the puppet module, I got further. Hence my suggestion, override method_missing with a hint perhaps of what methods are available or with a hint that I should try without custom views.

haf commented 11 years ago

OK, I got it started by not using the module, going to fix the module now.

haf commented 11 years ago

Module fixed. Here right now. Does it look right to you?

Would you care to have a look at the deployment?

I have set up a test server at http://ec2-54-228-166-221.eu-west-1.compute.amazonaws.com:4567/ but I can't see any docs on how to change the web socket uri to the right. I would like to parametise riemann::dash more, could you recommend what to parametise other than the above?

aphyr commented 11 years ago

To change the websocket URI, just click in the box, type, and hit enter when ready.

haf commented 11 years ago

Hi, yes, I have figured that out, but can I somehow configure it to be correct by default?