amir-yaghoubi / statsly

NodeJs stats collector using redisDB and influxDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Statsly

npm version

Statsly is a stats collector leveraging redisDB and influxDB

Installation

Run npm install statsly

Usage

First of all you should register your category (statsly.register('cat')). after that you can start incrementing stats for your category:

statsly.increment('cat', 'successRequest', 1)

Now in-order to periodically insert data influx you should start stats collector:

const frequency = 5 * 60 * 1000 // 5 min
statsly.startCollector(frequency)

Collector only insert stats for registered categories

Example

Check out examples/ folder for more example and usages.

About

NodeJs stats collector using redisDB and influxDB

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%