Skip to content

chrisr1386/batsd-dash

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

batsd-dash

Configurable dashboard for batsd-server.

Setup

Install

To install batsd-dash, simply install the gem

gem install batsd-dash

Configuration

Here is a sample rackup file (config.ru):

require 'batsd-dash'

# set batsd server setting 
BatsdDash::ConnectionPool.settings = { host:'localhost', port: 8127, pool_size: 8 }

# run the app 
run BatsdDash::App

Rack is very powerful. You can password protect your batsd-dash instance by using Rack::Auth::Basic or Rack::Auth::Digest::MD5.

Viewing Graphs

Graphs are rendered using nv.d3, a powerful graph and visualization library.

Since rendering is all done on the client, we make use of hash based navigation in order to reduce the amount of requests while still maintaining 'linkability'.

For example, to view a graph for the counter a.b statistic, you would need to make the following request from your browser:

/graph#counters=a.b

The graph view will provide you with a date time picker to make selecting different time ranges easier. Graphs are updated when you press the 'View' button or when the URL is updated.

It's possible to view more than one metric at the same time. To do this, visit the following route from your browser:

/graph#counters=a.b,c.d

You can also view different datatypes at the same time:

/graph#counters=a.b&timers=x.y

NOTE: As of now, a single y-axis is used when datatypes are mixed. Soon, we will add support for multiple axis when viewing mixed types.

Data API

The application provides a simple JSON-based API for accessing data from the batds data server. The data API accepts similar parameters as the graph view but uses traditional query strings instead:

/data?counters[]=a.b&counters[]=c.d&timers[]=x.y

The data API also accepts a start and stop unix timestamp parameter for accessing different ranges of data. Note that, the data API will only respond with JSON if the Accept header to set to application/json!

Graph and Render Options

  1. Zerofill: TODO Add details about zerofill

Development

Asset Management

We use Sass for CSS within this project. If you make any changes to the Sass files, ensure you recompile the CSS. This is done by running:

compass compile --force --output-style compact --environment production --sass-dir lib/batsd-dash/sass --css-dir lib/public/css

Additionally, it is highly recommended you use thin for development since this app uses EventMachine.

About

This is project is maintained and developed by the people behind BreakBase (@mikeycgto and @btoconnor)

About

Sinatra-based dash app for batsd

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published