Coder Social home page Coder Social logo

fnordmetric's Introduction

FnordMetric

FnordMetric is a highly configurable (and pretty fast) realtime app/event tracking thing based on ruby eventmachine and redis. You define your own plotting and counting functions as ruby blocks! See it in action! (RailsCasts)

Documentation: fnordmetric.io

Build status - Travis-ci

Screenshot

Getting Started

FnordMetric is based on ruby eventmachine and needs to run in a seperate ruby process. The preferred way to start it is to create a ruby file (where you put your DSL statements) and execute it (more about that in the documentation)

Save this to my_fnordmetric.rb

require "fnordmetric"

FnordMetric.namespace :myapp do

  # render a timeseries graph
  widget 'Sales',
    :title => "Sales per Minute",
    :gauges => [:sales_per_minute],
    :type => :timeline,
    :width => 100,
    :autoupdate => 1

end

FnordMetric.standalone

In this case we created one timeseries chart on the dashboard "Sales" that will display the number of sales_per_minute and auto-refresh every second.

You should now be able to start the dashboard on http://localhost:4242/ (default) by running:

$ ruby my_fnordmetric.rb

Now we can start sending data to FnordMetric. The canonical way to submit data is the HTTP API. This will report a single sale:

curl -X POST -d '{ "_type": "_incr", "value": 1, "gauge": "sales_per_minute" }' http://localhost:4242/events

There are various other ways to submit events to FnordMetric (more information in the documentation).

HTML5 API

FnordMetric offers a HTML5 / JavaScript API (called FnordMetric UI) that allows you to plug real-time data and charts into any website without having to write code. This is achieved by including a JavaScript library and using data-* attributes on html elements to declare the widgets.

<link href='http://localhost:4242/fnordmetric-ui.css' type='text/css' rel='stylesheet' />
<script src='http://localhost:4242/fnordmetric-ui.js' type='text/javascript'></script>

<span
  data-fnordmetric="counter"
  data-gauge="sales_per_minute"
  data-autoupdate="1"
  data-unit=""
  >0</span>

<script>
  FnordMetric.setup({
    "address":   "localhost:4242",
    "namespace": "myapp"
  });
</script>

Installation

gem install fnordmetric

or in your Gemfile:

gem 'fnordmetric', '>= 1.0.0'

Documentation

You can find the full FnordMetric Documentation at http://fnordmetric.io/

Contributors

http://github.com/paulasmuth/fnordmetric/graphs/contributors

(One patch or more)

To contribute, please fork this repository, make your changes and run the specs, commit them to your github repository and send me a pull request. Need help, head on over to our Google Groups page to discuss any ideas that you might have.

License

Copyright (c) 2011 Paul Asmuth

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to use, copy and modify copies of the Software, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

fnordmetric's People

Contributors

asmuth avatar johnmurray avatar mborromeo avatar rossta avatar kazjote avatar tadassce avatar skorfmann avatar fd avatar alindeman avatar dalecaru avatar imajes avatar jurriaan avatar kirs avatar sergeyjey avatar l4u avatar divineforest avatar croby avatar denispeplin avatar madtrick avatar fddayan avatar francois2metz avatar kunalmodi avatar fairchild avatar oleriesenberg avatar pietern avatar scottradcliff avatar laserlemon avatar tobiashm avatar tobsch avatar mcfiredrill avatar

Watchers

Areski Belaid avatar James Cloos avatar  avatar

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.