Giter Club home page Giter Club logo

riemann-dash's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

riemann-dash's Issues

thin: wrong number of arguments

Running riemann-dash crashes with the following output:

$ riemann-dash 
No configuration loaded; using defaults.
/usr/lib/ruby/gems/2.1.0/gems/thin-2.0.0.pre/lib/thin/server.rb:108:in `initialize': wrong number of arguments (4 for 0..3) (ArgumentError)
    from /usr/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:14:in `new'
    from /usr/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:14:in `run'
    from /usr/lib/ruby/gems/2.1.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1497:in `start_server'
    from /usr/lib/ruby/gems/2.1.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1435:in `run!'
    from /usr/lib/ruby/gems/2.1.0/gems/riemann-dash-0.2.8/bin/riemann-dash:7:in `<top (required)>'
    from /usr/bin/riemann-dash:23:in `load'
    from /usr/bin/riemann-dash:23:in `<main>'
$ ruby --version
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

Any idea?

Optimize views/grid

Okay, excellent. So, let's assume there's no easy way to optimize the width changes. But we can very easily optimize everything else. Strip all the jQuery calls out of partialRender and renderElement. Don't look up any elements there either; cache your element lookups beforehand, ideally as raw DOM elements or arrays of DOM elements.
(12:18:10 PM) Ryan Grove: In renderElement, if you make only native DOM calls, that should chop a significant chunk off your cost, even if you still touch all those widths.
(12:18:30 PM) Aphyr: Yeah, I think you're right.
(12:18:32 PM) Ryan Grove: In Chrome and FF, you have a very good native querySelectorAll implementation, so jQuery is pretty unnecessary for that.

Provide support for the latest version of gem thin.

Came across this error after install riemann-dash via the gem method.

No configuration loaded; using defaults.
/home/chancock/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thin-2.0.0.pre/lib/thin/server.rb:108:in initialize': wrong number of arguments (4 for 0..3) (ArgumentError) from /home/chancock/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:14:innew'
from /home/chancock/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/handler/thin.rb:14:in run' from /home/chancock/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1497:instart_server'
from /home/chancock/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sinatra-1.4.5/lib/sinatra/base.rb:1435:in run!' from /home/chancock/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/riemann-dash-0.2.11/bin/riemann-dash:7:in<top (required)>'
from /home/chancock/.rbenv/versions/2.1.2/bin/riemann-dash:23:in load' from /home/chancock/.rbenv/versions/2.1.2/bin/riemann-dash:23:in

'

From my research this error is specific to the latest version of thin that is available via rubygems. Recommend that a dependency be set for specific Thin version lower than 2.2.0.pre or see if work can be done to start using the latest version of Thin.

if I have some cycles I will try to take a look and see if I can submit a patch.

Please let me know if I can provide any additional information.

How to start with the dashboard?

I was very excited about Riemann when I watched the talk on the Riemann homepage. I thought it would solve all my problems, but I can't get the visualization of the dashboard to run.

I have been testing riemann-dash via Docker containers, I tried rlister/riemann-dash and building my own container according to the blog entry "Realtime Cluster Monitoring With Docker Swarm And Riemann".

The challenge I am facing is that I can't edit anything. The dashboard comes up, I am supposed to press "e", but nothing happens. I am using OS X, I tried activating views (I assume that means tabs) with alt-cmd-click, still I cant do anything via "e". I changed the address to the Riemann server, nothing happens. (Tested the address with telnet, I can connect, so server seems to be running). I watched a tutorial, but for me the edit window never shows up. Tested in Chrome, Firefox and Safari on OS X. No error messages in the console.

What am I missing?

riemann-dash

Error starting riemann-dash

CentOS 6.5, Ruby 1.8.7, Gem 1.3.7

[vagrant@vagrant-centos64 ~]$ riemann-dash
No configuration loaded; using defaults.
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': /usr/lib/ruby/gems/1.8/gems/webrick-1.3.1/lib/webrick/httprequest.rb:302: nested *?+ in regexp: /^(\S+)\s+(\S++)(?:\s+HTTP/(\d+.\d+))?\r?\n/ (SyntaxError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' from /usr/lib/ruby/gems/1.8/gems/webrick-1.3.1/lib/webrick.rb:223 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler/webrick.rb:1 from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in const_get'
from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in get' from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:26:in inject'
from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in each' from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in inject'
from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in get' from /usr/lib/ruby/gems/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:1770:in detect_rack_handler'
from /usr/lib/ruby/gems/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:1768:in each' from /usr/lib/ruby/gems/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:1768:in detect_rack_handler'
from /usr/lib/ruby/gems/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:1429:in run!' from /usr/lib/ruby/gems/1.8/gems/riemann-dash-0.2.9/bin/riemann-dash:7 from /usr/bin/riemann-dash:19:in load'
from /usr/bin/riemann-dash:19`

Theme and Custom views support. Would you be interested in this addition?

For our use case we'll need to be able to theme the dashboards and add custom views quickly. We'd like to be able to add css custom to a specific installation without touching the gem directories or the index.erubis file where those are added.

We'd rather not work off of a fork of the gem while developing views either. So the functionality we were planning to add was an ability to add a secondary views and styles path in the config file. We thought it could be accomplished as follows.

Change the index.erubis to populate styles and views as follows:

<% config.views.each do |custom_view|  %>
  <script src="<%= custom_view %>"></script>
<% end %>

And this to the styles section

<% config.styles.each do |custom_style|  %>
  <script src="<%= custom_style %>"></script>
<% end %>

Now we can add content easily from config without having to change the index file

Now we can add some options (and subsequent processing) for the config file
config['custom_content'] A directory that will get symlinked in to the public path

that allows you to specify a local directory and two lists
config['custom_views'] Views located in the custom_content directory that you want to use
config['custom_styles'] CSS located in the custom_content directory that you want to use

Now when the server boots up it can make sure there is a symlink to the custom_content path, and the index will include your custom content last so that you can override any of the default styles.

We need this functionality for what we are doing. If you understand what we are trying to achieve and you think the gem already supports this, and we are missing it, we would happily do it the right way.

Otherwise, If we do make this adjustment would you be interested in it?

handle more than 1 configuration set

it would be nice to be able to switch between different workspace layouts.

I imagine a dropdown menu to let the user choose between existing configurations (one file per configuration in the config/ dir).

Hitting 's' should open a popup asking if a new configuration should get created or if the current one must be updated.

Rack::CommonLogging is enabled even when RACK_ENV is set to production

Hi.

I tried to figure out how to disable those logging messages :

172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /subs.js HTTP/1.1" 304 0
http://localhost:4567/ -> /subs.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /toolbar.js HTTP/1.1" 304 0
http://localhost:4567/ -> /toolbar.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /eventPane.js HTTP/1.1" 304 0
http://localhost:4567/ -> /eventPane.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /view.js HTTP/1.1" 304 0
http://localhost:4567/ -> /view.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/timeseries.js HTTP/1.1" 304 0
http://localhost:4567/ -> /views/timeseries.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/flot.js HTTP/1.1" 304 0
http://localhost:4567/ -> /views/flot.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/title.js HTTP/1.1" 304 0
http://localhost:4567/ -> /views/title.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/log.js HTTP/1.1" 304 0
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/list.js HTTP/1.1" 304 0
http://localhost:4567/ -> /views/log.js
http://localhost:4567/ -> /views/list.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/help.js HTTP/1.1" 304 0
http://localhost:4567/ -> /views/help.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/gauge.js HTTP/1.1" 304 0
http://localhost:4567/ -> /views/gauge.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/dial.js HTTP/1.1" 304 0
http://localhost:4567/ -> /views/dial.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /views/grid.js HTTP/1.1" 304 0
http://localhost:4567/ -> /views/grid.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /dash.js HTTP/1.1" 304 0
http://localhost:4567/ -> /dash.js
172.17.42.1 - - [14/Jul/2015:06:34:23 UTC] "GET /config HTTP/1.1" 200 2
http://localhost:4567/ -> /config

I tried to set the environment variable RACK_ENV to production but it doesn't work :(

Suggestions?

fix incorrect (404) link to spec in help text

I'm thinking the following:

https://github.com/aphyr/riemann/blob/master/src/riemann/Query.g should now be https://github.com/riemann/riemann/blob/master/resources/query.g4 in lib/riemann/dash/public/views/help.js ?

toolbar height is to small

Currently the height of the toolbar div is to small. If there are many tabs they wrap and are hidden by the view div. Both the toolbar and the view have absolute positions.
There are two possible solutions.

  1. Might the height of the toolbar div and position of the view div larger (lets say 100px).
  2. Since the content is dynamically created, the toolbar div and position of the view div can be adjust appropriately.

Provide some way to connect to WebSocketSecure (wss://)

I set up riemann-dash behind apache as a reverse proxy to provide digest authentication to secure its access. I have also enabled SSL on that VirtualHost to provide encryption for the now flying passwords.

On Firefox it is forbidden (by default) to connect to a normal websocket coming from an HTTPS site, so the dash is unusable with that set up. Chrome doesn't care about it and works the same.

I found this related info

I tried two different approaches:

  • I installed stud to enable SSL for riemann's websockets (as recommended for aleph) but couldn't make it work. I'm guessing there's something missing from the dash as a client? There's a chance I missed something, though.
  • I toggled network.websocket.allowInsecureFromHTTPS on Firefox's config and it worked, but I think we could work out a way to avoid this.

Let me know if you need any extra information or test setup maybe.

Thanks!

Edit on mac os x does not work

Hi,

I'm starting to play with riemann and am running these two containers locally (from dockerhub):

  • rlister/riemann
  • rlister/riemann-dash

I've connected to riemann-dash successfully but I'm unable to get through even the Quickstart as I cannot edit the view - the doc/site says to press "e" but nothing happens.

Then, press "e" to edit, and change "Title" to "Grid". We need to choose a query to select specific states from the index. For starters, let's select everything by typing true in the query field. Hit "Apply" when you're ready.

I'm running Mac OS X 10.10.5 (Yosemite) - maybe this is common knowledge but I couldn't find anything.

Thanks!
Alex

"expired" events appearing from nowhere

Hello.
Here is the config for the riemann-server:

(streams
  (where (and
          (host #"^nkutselev05")
          (service #"^network.eth0.rx_packets"))
  #(info %)
  (index)
  ) ; where
  (expired #(info %))
)

Here is the riemann.log:

INFO [2015-10-19 21:42:59,293] defaultEventExecutorGroup-2-1 - riemann.config - #riemann.codec.Event{:host nkutselev05.staging.dw.sc.gwallet.com, :service network.eth0.rx_packets, :state ok, :description Network eth0 RX packets/sec, :metric 8.000018437745943, :tags [tensor linux], :time 1445316178, :ttl 120.0}
INFO [2015-10-19 21:43:29,295] defaultEventExecutorGroup-2-1 - riemann.config - #riemann.codec.Event{:host nkutselev05.staging.dw.sc.gwallet.com, :service network.eth0.rx_packets, :state ok, :description Network eth0 RX packets/sec, :metric 9.199983402917923, :tags [tensor linux], :time 1445316208, :ttl 120.0}
INFO [2015-10-19 21:43:59,294] defaultEventExecutorGroup-2-1 - riemann.config - #riemann.codec.Event{:host nkutselev05.staging.dw.sc.gwallet.com, :service network.eth0.rx_packets, :state ok, :description Network eth0 RX packets/sec, :metric 7.933317760392135, :tags [tensor linux], :time 1445316238, :ttl 120.0}
INFO [2015-10-19 21:44:29,294] defaultEventExecutorGroup-2-1 - riemann.config - #riemann.codec.Event{:host nkutselev05.staging.dw.sc.gwallet.com, :service network.eth0.rx_packets, :state ok, :description Network eth0 RX packets/sec, :metric 9.300014264605467, :tags [tensor linux], :time 1445316268, :ttl 120.0}
INFO [2015-10-19 21:44:59,293] defaultEventExecutorGroup-2-1 - riemann.config - #riemann.codec.Event{:host nkutselev05.staging.dw.sc.gwallet.com, :service network.eth0.rx_packets, :state ok, :description Network eth0 RX packets/sec, :metric 7.633263327392897, :tags [tensor linux], :time 1445316298, :ttl 120.0}
INFO [2015-10-19 21:45:29,294] defaultEventExecutorGroup-2-1 - riemann.config - #riemann.codec.Event{:host nkutselev05.staging.dw.sc.gwallet.com, :service network.eth0.rx_packets, :state ok, :description Network eth0 RX packets/sec, :metric 9.766674195666289, :tags [tensor linux], :time 1445316328, :ttl 120.0}

So everything looks fine. But look at the riemann-dash:
image

WTF? These "expired" events are not supposed to be here.

Crashes with NoMethodError on Ruby 2.0 and OS 10.9

I installed Riemann v0.2.4 with Homebrew on Mac OS 10.9.1, installed riemann-dash with gem install --no-ri --no-rdoc riemann-dash, started it with riemann-dash and visited it at http://localhost:4567. It looks like something is rendering incorrectly when viewed in the web browser:

screen shot 2013-12-23 at 12 50 00 pm

The sinatra server crashes with a NoMethodError. Here is the stack trace:

NoMethodError - undefined method `empty?' for nil:NilClass:
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sass-3.1.15/lib/sass/tree/root_node.rb:23:in `render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sass-3.1.15/lib/sass/engine.rb:299:in `_render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sass-3.1.15/lib/sass/engine.rb:246:in `render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/css.rb:24:in `evaluate'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:805:in `render'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:684:in `scss'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/riemann-dash-0.2.6/lib/riemann/dash/controller/css.rb:3:in `block in <class:App>'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1593:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1593:in `block in compile!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `[]'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `block (3 levels) in route!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:976:in `route_eval'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `block (2 levels) in route!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:997:in `block in process_route'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in `catch'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in `process_route'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:955:in `block in route!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in `each'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in `route!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1067:in `block in dispatch!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `block in invoke'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `catch'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `invoke'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1064:in `dispatch!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:in `block in call!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `block in invoke'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `catch'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `invoke'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:in `call!'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:877:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/riemann-dash-0.2.6/lib/riemann/dash/rack/static.rb:9:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/xss_header.rb:18:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/path_traversal.rb:16:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/json_csrf.rb:18:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/base.rb:50:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-protection-1.5.1/lib/rack/protection/frame_options.rb:31:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/nulllogger.rb:9:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/show_exceptions.rb:21:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:180:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:2004:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in `block in call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1778:in `synchronize'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:82:in `block in pre_process'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:80:in `catch'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/connection.rb:80:in `pre_process'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `call'
    /Users/jergason/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:1037:in `block in spawn_threadpool'

Looking in the chrome dev console shows a 500 error when trying to get /css:

screen shot 2013-12-23 at 12 55 15 pm

Problems using riemann-dash with secure websockets wss

I'm trying to set up secure websockets.
I'm using caddy with the following config (Caddyfile):

127.0.0.1:4443 {
  tls self_signed
  proxy / 127.0.0.1:4567
}
127.0.0.1:5559 {
  tls self_signed
  proxy / 127.0.0.1:5556 {
    websocket
  }
  log /dev/stdout
}

I can successfully connect a command line client like wscat or python websocket-client.
However, when I point firefox to https://localhost:4443, riemann-dash reports a Socker error and displays no events. I did set network.websocket.allowInsecureFromHTTPS=true in Firefox.

Here's the riemann-dash config:

{
  "server": "127.0.0.1:5559",
  "server_type": "ws",
  ...
}

And he riemann config:

(let [host "127.0.0.1"]
  (tcp-server {:host host})
  (sse-server {:host host})
  (ws-server  {:host host}))
...

Has anybody successfully set up wss with riemann-dash?

Grid alignment issues when only a small amount of metrics

First reported by metcalfc on IRC:

"In the basic grid view events/s box being a different size and alignment known issue? Didn't see something on the project issues."

If your grid has a single column or maybe two the sizes jump around

Unit tests currently broken?

Hi All,
Running '''sh/test''' gives me the following results:

12 tests, 19 assertions, 0 failures, 3 errors, 0 skips

The three broken tests are all attempting to access methods in Riemann::Dash::Config which were removed in a previous commit, specifically update_ws_config and read_ws_config

The specific failling tests are:

1) Error:
test_0001_reads the file, if present(Riemann::Dash::Config::workspace config::read_ws_config):
NoMethodError: undefined method `read_ws_config' for #<Riemann::Dash::Config:0x007fe52a10ce28>
/Users/amarks/Code/riemann/riemann-dash/test/config_test.rb:86:in `block (4 levels) in <top (required)>'
[...]

2) Error:
test_0001_works(Riemann::Dash::Config::workspace config::update_ws_config):
NoMethodError: undefined method `update_ws_config' for     #<Riemann::Dash::Config:0x007fe52a1162e8>
/Users/amarks/Code/riemann/riemann-dash/test/config_test.rb:93:in `block (4 levels) in <top (required)>'
[...]

3) Error:
test_0002_pretty-prints the config(Riemann::Dash::Config::workspace config::update_ws_config):
NoMethodError: undefined method `update_ws_config' for #<Riemann::Dash::Config:0x007fe52a15c900>
/Users/amarks/Code/riemann/riemann-dash/test/config_test.rb:98:in `block (4 levels) in <top (required)>'
[...]

Note: this is my first time running these tests, so it's possible I have a configuration issue behind these problems.

My environment:

~/C/r/riemann-dash ❯❯❯ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

~/C/r/riemann-dash ❯❯❯ sh/c
irb(main):001:0> Riemann::Dash::VERSION
`=> "0.2.9"``

Internal state table with expiry

We need a micro index--just a prioqueue of events by their expiry time--to let views know when events they received have expired. Should probably sit between the subscription manager and the view itself.

Getting started

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

Add "Undo" operation to riemann-dash

As riemann-dash is not stable enough, Sometimes I move panels and they disappear.

Maybe it's a good idea to add an "Undo" operation to riemann-dash.

If you have a basic Idea on how to implement it, I'll be happy to implement it.

Events/sec comes in under a nil hostname

This may be related to a previous issue I saw, but wanted to post this was with a default install on 2.5.1.

image

I'm using a modified theme, but this happens on the original white theme aswell.

Enhancement: grid dial view

Putting this here for reference: it would be awesome to have a view with multiple dials, e.g. one per matching event - some kind of dial-grid

config.json issue

I am bringing up a riemann monitoring system. I kept losing all the non-default customization
for riemann-dash (the definition of the graphs). Eventually I realized what was happening:

If a config.json file exists in the config directory (which in my install is at /var/lib/gems/1.9.1/gems/riemann-dash-0.2.9/config)
then when I do 's' in riemann-dash to save the config.json file, the config.json file is overwritten by config.json for the default startup display, which is an empty view with the title RIEMANN and the help menu.
If there is NO config.json in this directory, then the config.json that is written defines the graphs as I've customized them in reimann-dash.

The user-group for the config.json file is riemann-riemann.

grid caching commit breaks freshness of data

When running a grid view, events only get updated after the expiry of the first event.
Example:

r << { service: "a", state: "ok"}

Shows up in the dash as a green event

r << { service: "a", state: "warning"}

The dash keeps showing green.

After running git-bisect it appears this unexpected behaviour was introduced in commit 449afa9

[Bug] LogView crashes with undefined host

tl;dr events with nil hosts in Riemann cause LogViews in riemann-dash to die at template-rendering time.

Here's an example stream (from the default riemann.config) that will emit events without a host:

(with {:metric 1 :host nil :state "ok" :service "events/sec"}
  (rate 5 index))

When these events are streamed to riemann-dash, the host key will not be present in the event object. Rendering the underscore template (here) without all required keys will result in a template exception.

The quick and dirty fix is to merge the event object with an object containing default values (empty strings?) for the following keys before rendering the template:

  1. host
  2. service
  3. state
  4. metric
  5. description

Request for enhancement: ability to specify riemann host, port, connection type as HTTP GET parameters

In my environment, I have a few Riemann instances running on distinct perimeters and I only have a single dash. It would save me a lot of pain if I could specify the host, port and connection type in Riemann dash URL.

e.g:

(reminder: %3A = ":" char)

Benefits:

  • No need to edit fields,
  • URLs could be bookmarked,
  • Riemann instances could be directly linked from some other pages.

This would override the on-disk configuration default values for these fields.

Error starting riemann-dash

CentOS 6.5, Ruby 1.8.7, Gem 1.3.7, riemann-dash-0.2.9

[vagrant@vagrant-centos64 ~]$ riemann-dash
No configuration loaded; using defaults.

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /usr/lib/ruby/gems/1.8/gems/webrick-1.3.1/lib/webrick/httprequest.rb:302: nested *?+ in regexp: /^(\S+)\s+(\S++)(?:\s+HTTP\/(\d+\.\d+))?\r?\n/ (SyntaxError)
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/webrick-1.3.1/lib/webrick.rb:223
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler/webrick.rb:1
    from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in `const_get'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in `get'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:26:in `inject'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in `each'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in `inject'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler.rb:20:in `get'
    from /usr/lib/ruby/gems/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:1770:in `detect_rack_handler'
    from /usr/lib/ruby/gems/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:1768:in `each'
    from /usr/lib/ruby/gems/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:1768:in `detect_rack_handler'
    from /usr/lib/ruby/gems/1.8/gems/sinatra-1.4.5/lib/sinatra/base.rb:1429:in `run!'
    from /usr/lib/ruby/gems/1.8/gems/riemann-dash-0.2.9/bin/riemann-dash:7
    from /usr/bin/riemann-dash:19:in `load'
    from /usr/bin/riemann-dash:19

Installation fails on some rubygems

Installing on

ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
rubygems 1.3.7

Fails from rubygems on Wed Jan 30 11:48:35 PST 2013

Succeeds when built on 1.8.7p352, gems 1.3.7
Succeeds when built on 1.8.7p371, gems 1.8.11
Fails when built on 1.9.3rev32789, gems 1.8.10

Graphs going backward in time... sometimes

I'm not exactly sure how to reproduce this – so feel free to close as irreproducible. But: when Riemann is experiencing issues (this usually happens right before some kind of failure – which happens when the rest of the system is also experiencing failure, so way too much data is getting sent to riemann), the graphs start going backward and forward... if nothing else, here is a beautiful screenshot:

screen shot 2015-05-07 at 1 13 30 pm

`setup_storage_backend': Unknown backend

No configuration loaded; using defaults.
C:/Ruby21/lib/ruby/gems/2.1.0/gems/riemann-dash-0.2.14/lib/riemann/dash/config.rb:81:in setup_storage_backend': Unknown backend for C:/Ruby21/lib/ruby/gems/2.1.0/gems/riemann-dash-0.2.14/config/config.json (Exception) from C:/Ruby21/lib/ruby/gems/2.1.0/gems/riemann-dash-0.2.14/lib/riemann/dash/app.rb:29:in load'
from C:/Ruby21/lib/ruby/gems/2.1.0/gems/riemann-dash-0.2.14/bin/riemann-dash:6:in <top (required)>' from C:/Ruby21/bin/riemann-dash:23:in load'
from C:/Ruby21/bin/riemann-dash:23:in `

'

Dashboard showing socker error,

Hi

We are using riemann for first time and after setting up, we are seeing socket error check server field.
Trying to add the events via ruby client but still not successful. Riemann is of latest version

Below id the riemann.config file being used Please help us in understanding what is wrong with the configuration.

; -- mode: clojure; --
; vim: filetype=clojure

(logging/init {:file "riemann.log"})

; Listen on the local interface over TCP (5555), UDP (5555), and websockets
; (5556)
(let [host "0.0.0.0"](tcp-server {:host host})
(udp-server {:host host})
(ws-server {:host host}))

; Expire old events from the index every 5 seconds.
(periodically-expire 5)

(let [index (default :ttl 300 (update-index (index)))](streams
index))

(let [hosts (atom #{})](fn [event]
%28swap! hosts conj %28:host event%29%29
%28prn :hosts @hosts%29
%28index {:service "unique hosts"
:time %28unix-time)
:metric (count @hosts)})))

riemann-dash 0.1.1 gem: start_chart: no method nan? for fixnum

Using the 0.1.1 riemann-dash gem

riemann/dash/helper/renderer.rb method state_chart has the following line:

if s.metric && !(s.metric.nan?)

I do not understand why but this can generate a no method exception nan? for fixnum.

A simple workaround is e.g.

if s.metric && !(s.metric.nan? rescue true)

but this just conceals the underlying problem.

Key bindings not working on OS X

None of the keyboard bindings work on OS X in Safari, Firefox or Chrome. 'e' doesn't work at all. Nothing in the console about what's broken.

Have you seen it before or something?

Grid view displays "nil" for host name

The Grid view will display name as the hostname if there is only one host sending events.

For example if I have only one monitee and I have disable the server to send intrumentation messages then the hostname isnt visible on the beginning of the row

grid view displays nil as hostname

The row/column prefix stripping code in the grid view (and maybe others, flot for sure in the graph legend) will completely strip away the host name if there's only one host being displayed. (Assuming the default row/column configuration.)

I'd prefer to see the host name instead of the 'nil' :)

Convert to pure clojure app?

I was wondering if anyone had considered converting riemann-dash to a pure clojure application to remove the ruby dependency, seems like ruby/rails is barely required as it is only serving files and allowing simple config load/save.

If you thought it'd be useful/desirable then I could have a stab at it.

grid: events don't expire when using custom attributes in rows/columns

When using custom attributes instead of the default host/service axes, the events never expire in the grid view. Here's a minimal test case:

  • riemann.config
(let [host "127.0.0.1"]
  (tcp-server :host host :port 55555)
  (udp-server :host host :port 55555)
  (ws-server  :host host :port 55556))

(periodically-expire 5)

(let [index (default {:ttl 5 :state "ok"} (update-index (index)))]
  (streams index))
  • riemann_dash-config.json
{
  "server":"localhost:55556",
  "server_type":"ws",
  "workspaces":[
    {
      "name":"test",
      "view":{
        "type":"Balloon",
        "weight":1,
        "id":"f6886a97daedb6df8ff1702075795533d6411dd1",
        "version":7,
        "child":{
          "type":"VStack",
          "weight":1,
          "id":"3dcfa12de6e2c1b033b7b49591e065bd419fc15c",
          "version":7,
          "children":[
            {
              "type":"Grid",
              "weight":1,
              "id":"92a8b2a3f2fbc3873d74c55ae81ffe03357875da",
              "version":6,
              "title":"test",
              "query":"tagged \"test\"",
              "max":"",
              "rows":"foo",
              "cols":"bar",
              "row_sort":"lexical",
              "col_sort":"lexical"
            },
            {
              "type":"Grid",
              "weight":1,
              "id":"b3164ce0e44b449e9d520a0aabf60e770b2a0625",
              "version":1,
              "title":"",
              "query":"tagged \"test\"",
              "max":"",
              "rows":"",
              "cols":"",
              "row_sort":"lexical",
              "col_sort":"lexical"
            }
          ]
        }
      },
      "id":"1b45a0bde6a77d7267102a18dfaf891bfbad9531"
    }
  ]
}
  • events
riemann-client send -t test -a foo=bar -a bar=baz localhost 55555
riemann-client send -t test -a foo=baz -a bar=bar localhost 55555

Initial state:
2014-09-05-135046_703x629_scrot
After 5 seconds:
2014-09-05-135052_703x629_scrot

riemann-dash does not allow setting host as documented.

The riemann-dash documentation implies that setting config[:client][:host] will target a non-default riemann server. When this setting is left at its default I find:

riemann@riemann:~$ cat dash.config 
set :bind, "REDACTED_IP"
#config[:client][:host] = 'REDACTED_IP'

riemann@riemann:~$ riemann-dash dash.config 
== Sinatra/1.3.5 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on REDACTED_IP:4567, CTRL+C to stop
^C>> Stopping ...

however

riemann@riemann:~$ cat dash.config 
set :bind, "REDACTED_IP"
config[:client][:host] = 'REDACTED_IP'
riemann@riemann:~$ riemann-dash dash.config 
/home/riemann/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/riemann-dash-0.2.1/lib/riemann/dash.rb:36:in `instance_eval': undefined method `[]=' for nil:NilClass (NoMethodError)
        from /home/riemann/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/riemann-dash-0.2.1/lib/riemann/dash.rb:36:in `instance_eval'
        from /home/riemann/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/riemann-dash-0.2.1/lib/riemann/dash.rb:36:in `load_config'
        from /home/riemann/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/riemann-dash-0.2.1/lib/riemann/dash.rb:21:in `load'
        from /home/riemann/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/riemann-dash-0.2.1/bin/riemann-dash:6:in `<top (required)>'
        from /home/riemann/.rbenv/versions/1.9.3-p327/bin/riemann-dash:23:in `load'
        from /home/riemann/.rbenv/versions/1.9.3-p327/bin/riemann-dash:23:in `<main>'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.