Coder Social home page Coder Social logo

node-bell's Introduction

Bell

Realtime anomalies detection based on statsd, for periodic time series.

Latest version: v0.1.6

Requirements

Installation

npm install node-bell -g

then add node-bell to statsd's backends in statsd's config.js:

{
, backends: ["node-bell"]
}

Quick Start

  1. Start statsd & ssdb & beanstalkd.

  2. Generate sample configuration and edit it, default res/configs.toml:

    $ bell -s
    $ mv sample.configs.toml configs.toml
    $ vi configs.toml
  3. Start listener & analyzers (optional: webapp).

    bell analyzer -c configs.toml
    bell listener -c configs.toml
    bell webapp -c configs.toml

    You can view site on 0.0.0.0:8989.

Services

  1. listener: receives incoming metrics from statsd, then put them to job queue.
  2. analyzer(s): get job from job queue, and then analyze if current metric an anomaly or not.
  3. webapp: visualizes analyzation result on web.

Events & Hooks

Hook modules are Node.js modules that listen for events from node-bell. Each hook module shoule export the following initialization function:

  • init(configs, analyzer, log)

Events currently available:

  • Event 'anomaly detected'

    Parameters: (metric, multiples)

    Emitted when an anomaly was detected.

Built-in hook module (and sample hook): hooks.

Look Inside

Algorithm

3-sigma or called 68-95-99.7 rule, reference

Storage

Analyzers store metrics in ssdb, using zset, here is storage format for a single time series:

key       |  score
--------------------------------------
timestamp | value:is_anomaly:timestamp

Data Flow

 [statsd]
    |
    v        send to queue
[listener] -----------------> [beanstalkd]
                                  |
                                  | reserve
            history metrics       v       record anomalies
            ---------------> [analyzers] ----------------
            |                     |                     |
            |                     | put to ssdb         |
            |                     v                     |
            ------------------- [ssdb] <-----------------
                                  |
                                  |
                                  v
                               [webapp]

FAQ

FAQ.md

License

MIT. Copyright (c) 2014 Eleme, Inc.

node-bell's People

Contributors

hit9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.