2012-02-24 07:53:45 +00:00
|
|
|
Riemann-Dash
|
2012-02-18 23:40:30 +00:00
|
|
|
============
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-24 07:53:45 +00:00
|
|
|
An extensible Sinatra dashboard for Riemann. Connects to Riemann over the
|
2012-02-18 23:40:30 +00:00
|
|
|
network and shows events matching the queries you configure.
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
Get started
|
|
|
|
==========
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
``` bash
|
2012-02-24 07:53:45 +00:00
|
|
|
gem install riemann-dash
|
|
|
|
riemann-dash
|
2012-02-18 23:40:30 +00:00
|
|
|
```
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-24 07:53:45 +00:00
|
|
|
Riemann-dash will connect to a local Riemann server on port 5555, and display a
|
2012-02-18 23:40:30 +00:00
|
|
|
basic dashboard of all events in that server's index.
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
Configuring
|
|
|
|
===========
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-24 07:53:45 +00:00
|
|
|
Riemann-dash takes an optional config file, which you can specify as the first
|
2012-02-18 23:40:30 +00:00
|
|
|
command-line argument. If none is given, it looks for a file in the local
|
|
|
|
directory: config.rb. That file can override any configuration options on the
|
2012-02-24 07:53:45 +00:00
|
|
|
Dash class (hence all Sinatra configuration) as well as the Riemann client
|
2012-02-18 23:40:30 +00:00
|
|
|
options, etc.
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
``` ruby
|
|
|
|
set :port, 6000 # HTTP server on port 6000
|
|
|
|
config[:client][:host] = 'my.ustate.server'
|
|
|
|
```
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
You'll probably want a more specific dashboard:
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
``` ruby
|
2012-08-10 15:15:30 +00:00
|
|
|
config[:views] = 'my/custom/view/directory'
|
2012-02-18 23:22:24 +00:00
|
|
|
```
|
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
Then you can write your own index.erb (and other views too, if you like). I've
|
|
|
|
provided an default stylesheet, layout, and dashboard in
|
2012-02-24 07:53:45 +00:00
|
|
|
lib/riemann/dash/views--as well as an extensive set of functions for laying out
|
|
|
|
events from a given query: see lib/riemann/dash/helper/renderer.rb.
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
A long history with cacti, nagios, and the like has convinced me that a.) web
|
|
|
|
configuration of dashboards is inevitably slower than just writing the code and
|
|
|
|
b.) you're almost certainly going to want to need more functions than I can
|
|
|
|
give you. My goal is to give you the tools to make it easier and get out of
|
|
|
|
your way.
|
2012-02-18 23:22:24 +00:00
|
|
|
|
2012-02-18 23:40:30 +00:00
|
|
|
An example config.rb, additional controllers, views, and public directory are
|
|
|
|
all in doc/dash. Should give you ideas for extending the dashboard for your own
|
|
|
|
needs.
|